mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 16:23:55 -06:00
qapi: Permit omitting all flat union branches
Absent flat union branches default to the empty struct (since commit
800877bb16
"qapi: allow empty branches in flat unions"). But an
attempt to omit all of them is rejected with "Union 'FOO' has no
branches". Harmless oddity, but it's easy to avoid, so do that.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-Id: <20190913201349.24332-11-armbru@redhat.com>
[Commit message typo fixed]
This commit is contained in:
parent
f03255362a
commit
0ced9531f1
8 changed files with 27 additions and 14 deletions
|
@ -23,6 +23,15 @@ enum MyEnum
|
|||
object Empty1
|
||||
object Empty2
|
||||
base Empty1
|
||||
object q_obj_Union-base
|
||||
member type: EnumOne optional=False
|
||||
object Union
|
||||
base q_obj_Union-base
|
||||
tag type
|
||||
case value1: q_empty
|
||||
case value2: q_empty
|
||||
case value3: q_empty
|
||||
case value4: q_empty
|
||||
command user_def_cmd0 Empty2 -> Empty2
|
||||
gen=True success_response=True boxed=False oob=False preconfig=False
|
||||
enum QEnumTwo
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue