blob: e59333603941eda7286f20a5420ec61466886453 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
# Flat union branch name collision
# FIXME: this parses, but then fails to compile due to a duplicate 'c_d'
# (one from the base member, the other from the branch name). We should
# either reject the collision at parse time, or munge the generated branch
# name to allow this to compile.
{ 'enum': 'TestEnum',
'data': [ 'base', 'c-d' ] }
{ 'struct': 'Base',
'data': { 'enum1': 'TestEnum', '*c_d': 'str' } }
{ 'struct': 'Branch1',
'data': { 'string': 'str' } }
{ 'struct': 'Branch2',
'data': { 'value': 'int' } }
{ 'union': 'TestUnion',
'base': 'Base',
'discriminator': 'enum1',
'data': { 'base': 'Branch1',
'c-d': 'Branch2' } }
|