From fa110c6a9e6c0ae0ce2d4bcf5771cdb8c3e53a7e Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Fri, 27 Sep 2019 15:46:29 +0200 Subject: qapi: Move context-sensitive checking to the proper place When we introduced the QAPISchema intermediate representation (commit ac88219a6c7), we took a shortcut: we left check_exprs() & friends alone instead of moving semantic checks into the QAPISchemaFOO.check(). The .check() assert check_exprs() did its job. Time to finish the conversion job. Move exactly the context-sensitive checks to the .check(). They replace assertions there. Context-free checks stay put. Fixes the misleading optional tag error demonstrated by test flat-union-optional-discriminator. A few other error message improve. Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Message-Id: <20190927134639.4284-17-armbru@redhat.com> --- tests/qapi-schema/args-boxed-string.err | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/qapi-schema/args-boxed-string.err') diff --git a/tests/qapi-schema/args-boxed-string.err b/tests/qapi-schema/args-boxed-string.err index f284406..dc2b00f 100644 --- a/tests/qapi-schema/args-boxed-string.err +++ b/tests/qapi-schema/args-boxed-string.err @@ -1,2 +1,2 @@ tests/qapi-schema/args-boxed-string.json: In command 'foo': -tests/qapi-schema/args-boxed-string.json:2: 'data' for command 'foo' cannot use built-in type 'str' +tests/qapi-schema/args-boxed-string.json:2: command's 'data' cannot take built-in type 'str' -- cgit v1.1