blob: 66376084fce9d31a02bb562ed34b869c46d90718 (
plain)
1
2
3
4
5
6
7
8
9
10
11
|
# discriminator '*switch' isn't a member of base, 'switch' is
# reports "does not allow optional name", which is good enough
{ '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' } }
|