[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 <dsinclair@chromium.org>
Reviewed-by: dan sinclair <dsinclair@chromium.org>
This commit is contained in:
Sarah Mashayekhi 2020-11-16 14:35:17 +00:00 committed by Commit Bot service account
parent 4ad0019df0
commit 112314b73d
2 changed files with 4 additions and 7 deletions

View File

@ -986,8 +986,10 @@ bool TypeDeterminer::DetermineMemberAccessor(
std::make_unique<ast::type::VectorType>(vec->type(), size)); std::make_unique<ast::type::VectorType>(vec->type(), size));
} }
} else { } else {
set_error(expr->source(), set_error(
"invalid type " + data_type->type_name() + " in member accessor"); expr->source(),
"v-0007: invalid use of member accessor on a non-vector/non-struct " +
data_type->type_name());
return false; return false;
} }

View File

@ -8,10 +8,5 @@ global-vars-must-be-unique-v3.fail.wgsl
runtime-array-not-last.fail.wgsl runtime-array-not-last.fail.wgsl
self-recursion-v2.fail.wgsl self-recursion-v2.fail.wgsl
self-recursion.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-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 struct-use-before-def.fail.wgsl