From 112314b73d3edcb11e7f88458e02b022599172d4 Mon Sep 17 00:00:00 2001 From: Sarah Mashayekhi Date: Mon, 16 Nov 2020 14:35:17 +0000 Subject: [PATCH] [validation] add error number to invalid member accessor error: v-0007 Bug: tint:6 Change-Id: Ia92ed8a328ff3c7986d8e5298b13f5d1db33935b Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/32384 Commit-Queue: dan sinclair Reviewed-by: dan sinclair --- src/type_determiner.cc | 6 ++++-- tools/known_tint_failures | 5 ----- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/src/type_determiner.cc b/src/type_determiner.cc index 6a8532a7cb..6b5e6733bf 100644 --- a/src/type_determiner.cc +++ b/src/type_determiner.cc @@ -986,8 +986,10 @@ bool TypeDeterminer::DetermineMemberAccessor( std::make_unique(vec->type(), size)); } } else { - set_error(expr->source(), - "invalid type " + data_type->type_name() + " in member accessor"); + set_error( + expr->source(), + "v-0007: invalid use of member accessor on a non-vector/non-struct " + + data_type->type_name()); return false; } diff --git a/tools/known_tint_failures b/tools/known_tint_failures index 8cd01f14c6..baf153bee0 100644 --- a/tools/known_tint_failures +++ b/tools/known_tint_failures @@ -8,10 +8,5 @@ global-vars-must-be-unique-v3.fail.wgsl runtime-array-not-last.fail.wgsl self-recursion-v2.fail.wgsl self-recursion.fail.wgsl -struct-def-before-use.fail.wgsl -struct-member-def-before-use-v2.fail.wgsl struct-member-def-before-use-v3.fail.wgsl -struct-member-def-before-use-v4.fail.wgsl -struct-member-def-before-use-v5.fail.wgsl -struct-member-def-before-use.fail.wgsl struct-use-before-def.fail.wgsl