| # 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' } } |