blob: 8f710f08aa870056e8e77172df42f4a4650d4318 [file] [log] [blame]
# Flat union branch 'type'
# Reject this, because we would have a clash in generated C, between the
# outer tag 'type' and the branch name 'type' within the union.
# TODO: We could munge the generated C branch name to let it compile.
{ 'enum': 'TestEnum',
'data': [ 'type' ] }
{ 'struct': 'Base',
'data': { 'type': 'TestEnum' } }
{ 'struct': 'Branch1',
'data': { 'string': 'str' } }
{ 'union': 'TestUnion',
'base': 'Base',
'discriminator': 'type',
'data': { 'type': 'Branch1' } }