qapi: Forbid base without discriminator in unions
commita8d4a2e4d7e1a0207699de47142c9bdbf2cc8675
authorEric Blake <eblake@redhat.com>
Mon, 4 May 2015 15:05:07 +0000 (4 09:05 -0600)
committerMarkus Armbruster <armbru@redhat.com>
Tue, 5 May 2015 16:39:00 +0000 (5 18:39 +0200)
tree973bcf33a3b193b9d6f23c901ea3a650f2065de5
parent805017b7791200f1b72deef17dc98fd272b941eb
qapi: Forbid base without discriminator in unions

None of the existing QMP or QGA interfaces uses a union with a
base type but no discriminator; it is easier to avoid this in the
generator to save room for other future extensions more likely to
be useful.  An earlier commit added a union-base-no-discriminator
test to ensure that we eventually give a decent error message;
likewise, removing UserDefUnion outright is okay, because we moved
all the tests we wish to keep into the tests of the simple union
UserDefNativeListUnion in the previous commit.  Now is the time to
actually forbid simple union with base, and remove the last
vestiges from the testsuite.

Signed-off-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
scripts/qapi-types.py
scripts/qapi-visit.py
scripts/qapi.py
tests/qapi-schema/qapi-schema-test.json
tests/qapi-schema/qapi-schema-test.out
tests/qapi-schema/union-base-no-discriminator.err
tests/qapi-schema/union-base-no-discriminator.exit
tests/qapi-schema/union-base-no-discriminator.json
tests/qapi-schema/union-base-no-discriminator.out [copied from tests/qapi-schema/union-base-no-discriminator.err with 100% similarity]
tests/test-qmp-input-visitor.c
tests/test-qmp-output-visitor.c