qemu/tests/qapi-schema/flat-union-discriminator-ba...

11 lines
342 B
JSON

# discriminator '*switch' isn't a member of base, 'switch' is
{ 'enum': 'Enum', 'data': [ 'one', 'two' ] }
{ 'struct': 'Base',
'data': { '*switch': 'Enum' } }
{ 'struct': 'Branch', 'data': { 'name': 'str' } }
{ 'union': 'MyUnion',
'base': 'Base',
'discriminator': '*switch',
'data': { 'one': 'Branch',
'two': 'Branch' } }