blob: 8f710f08aa870056e8e77172df42f4a4650d4318 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
# 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' } }
|