mirror of
https://github.com/qemu/qemu.git
synced 2024-12-04 01:03:38 +08:00
4918bb7def
Prior to this commit, specifying a non-object value here causes the QAPI parser to crash in expr.py with a stack trace with (likely) an AttributeError when we attempt to call that value's items() method. This member needs to be an object (Dict), and not anything else. Add a check for this with a nicer error message, and formalize that check with new test cases that exercise that error. Signed-off-by: John Snow <jsnow@redhat.com> Message-Id: <20210421182032.3521476-8-jsnow@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com>
5 lines
105 B
JSON
5 lines
105 B
JSON
# Alternate type requires an object for 'data'
|
|
{ 'alternate': 'Alt',
|
|
'data': ['rubbish', 'nonsense']
|
|
}
|