On 08/31/2015 09:55 AM, Markus Armbruster wrote:
> check_type() first checks and peels off the array type, then checks
> the element type.  For two out of four error messages, it takes pains
> to report errors for "array of T" instead of just T.  Odd.  Let's
> examine the errors.
> 

> * The remaining two errors are unreachable, because the array checking
>   ensures that value is a string.

If we ever decide to enhance the grammar to allow
array-of-anonymous-type, we'd have to revisit this code; but that
doesn't affect the validity of this patch going in now.

> 
> Thus, reporting some errors for "array of T" instead of just T works,
> but dosn't really improve things.  Drop it.

s/dosn't/doesn't/

> 
> Signed-off-by: Markus Armbruster <arm...@redhat.com>
> ---
>  scripts/qapi.py                          | 6 ++----
>  tests/qapi-schema/args-array-unknown.err | 2 +-
>  tests/qapi-schema/returns-whitelist.err  | 2 +-
>  3 files changed, 4 insertions(+), 6 deletions(-)

Reviewed-by: Eric Blake <ebl...@redhat.com>

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to