From 46534309e667fd860720f983c2c9aefe0354340d Mon Sep 17 00:00:00 2001 From: Eric Blake Date: Wed, 17 Feb 2016 23:48:17 -0700 Subject: qapi: Forbid 'any' inside an alternate The whole point of an alternate is to allow some type-safety while still accepting more than one JSON type. Meanwhile, the 'any' type exists to bypass type-safety altogether. The two are incompatible: you can't accept every type, and still tell which branch of the alternate to use for the parse; fix this to give a sane error instead of a Python stack trace. Note that other types that can't be alternate members are caught earlier, by check_type(). Signed-off-by: Eric Blake Message-Id: <1455778109-6278-4-git-send-email-eblake@redhat.com> [Commit message tweaked] Signed-off-by: Markus Armbruster --- tests/Makefile | 1 + 1 file changed, 1 insertion(+) (limited to 'tests/Makefile') diff --git a/tests/Makefile b/tests/Makefile index c1c605fc63..7c66d1636e 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -241,6 +241,7 @@ check-qtest-xtensaeb-y = $(check-qtest-xtensa-y) check-qtest-generic-y += tests/qom-test$(EXESUF) +qapi-schema += alternate-any.json qapi-schema += alternate-array.json qapi-schema += alternate-base.json qapi-schema += alternate-clash.json -- cgit v1.2.3