From a17dbc4b79a28ffb9511f192474ffefd88214cde Mon Sep 17 00:00:00 2001 From: "Daniel P. Berrangé" Date: Thu, 20 Apr 2023 11:26:19 +0100 Subject: qapi: allow unions to contain further unions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This extends the QAPI schema validation to permit unions inside unions, provided the checks for clashing fields pass. Reviewed-by: Markus Armbruster Signed-off-by: Daniel P. Berrangé Message-Id: <20230420102619.348173-4-berrange@redhat.com> Signed-off-by: Markus Armbruster --- tests/qapi-schema/union-invalid-union-subtype.err | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 tests/qapi-schema/union-invalid-union-subtype.err (limited to 'tests/qapi-schema/union-invalid-union-subtype.err') diff --git a/tests/qapi-schema/union-invalid-union-subtype.err b/tests/qapi-schema/union-invalid-union-subtype.err new file mode 100644 index 0000000000..3538dc2e70 --- /dev/null +++ b/tests/qapi-schema/union-invalid-union-subtype.err @@ -0,0 +1,2 @@ +union-invalid-union-subtype.json: In union 'TestUnion': +union-invalid-union-subtype.json:25: base member 'type' of type 'TestTypeA' collides with base member 'type' -- cgit 1.4.1