aboutsummaryrefslogtreecommitdiff
path: root/tests/qapi-schema/union-invalid-base.json
blob: fd837cb80bebed63a6122535bdaf4a04ea33b34a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# a union base type must be a struct

##
# @TestTypeA:
##
{ 'struct': 'TestTypeA',
  'data': { 'string': 'str' } }

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

##
# @TestUnion:
##
{ 'union': 'TestUnion',
  'base': 'int',
  'discriminator': 'int',
  'data': { 'value1': 'TestTypeA',
            'value2': 'TestTypeB' } }