aboutsummaryrefslogtreecommitdiff
path: root/tests/qapi-schema/union-invalid-union-subtype.json
blob: ce1de51d8d9328102e1693edbc8b44467e22a5d2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# Clash between common member and union variant's common member
# Base's member 'type' clashes with TestTypeA's

{ 'enum': 'TestEnum',
  'data': [ 'value-a', 'value-b' ] }

{ 'enum': 'TestEnumA',
  'data': [ 'value-a1', 'value-a2' ] }

{ 'struct': 'TestTypeA1',
  'data': { 'integer': 'int' } }

{ 'struct': 'TestTypeA2',
  'data': { 'integer': 'int' } }

{ 'union': 'TestTypeA',
  'base': { 'type': 'TestEnumA' },
  'discriminator': 'type',
  'data': { 'value-a1': 'TestTypeA1',
            'value-a2': 'TestTypeA2' } }

{ 'struct': 'TestTypeB',
  'data': { 'integer': 'int' } }

{ 'union': 'TestUnion',
  'base': { 'type': 'TestEnum' },
  'discriminator': 'type',
  'data': { 'value-a': 'TestTypeA',
            'value-b': 'TestTypeB' } }