diff options
author | Markus Armbruster <armbru@redhat.com> | 2019-09-14 17:34:57 +0200 |
---|---|---|
committer | Markus Armbruster <armbru@redhat.com> | 2019-09-24 14:07:23 +0200 |
commit | 887a2069f76fa99b9755467126dd171a9bad34a3 (patch) | |
tree | 44ca21e5641e1442da0ef61f9174e99b9da7726a /tests/qapi-schema/flat-union-optional-discriminator.err | |
parent | 9d55380b5aecd4ae5324e7d4ab0a7dfc510b634d (diff) |
qapi: Fix broken discriminator error messages
check_union() checks the discriminator exists in base and makes sense.
Two error messages mention the base. These are broken for anonymous
bases, as demonstrated by tests flat-union-invalid-discriminator and
flat-union-invalid-if-discriminator.err. The third one doesn't
bother.
First broken when commit ac4338f8eb "qapi: Allow anonymous base for
flat union" (v2.6.0) neglected to adjust the "not a member of base"
error message. Commit ccadd6bcba "qapi: Add 'if' to implicit struct
members" (v4.0.0) then cloned the flawed error message.
Dumb them down not to mention the base.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20190914153506.2151-11-armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Diffstat (limited to 'tests/qapi-schema/flat-union-optional-discriminator.err')
-rw-r--r-- | tests/qapi-schema/flat-union-optional-discriminator.err | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/qapi-schema/flat-union-optional-discriminator.err b/tests/qapi-schema/flat-union-optional-discriminator.err index 8b4a4ba847..45f5407c34 100644 --- a/tests/qapi-schema/flat-union-optional-discriminator.err +++ b/tests/qapi-schema/flat-union-optional-discriminator.err @@ -1 +1 @@ -tests/qapi-schema/flat-union-optional-discriminator.json:7: Discriminator 'switch' is not a member of base struct 'Base' +tests/qapi-schema/flat-union-optional-discriminator.json:7: Discriminator 'switch' is not a member of 'base' |