[spirv-reader] Better ArrayStride error message.

The SPIR-V reader only accepts ArrayStride on Array or RuntimeArray
types. Update the error message from an ASSERT to have a bit more
context.

Fixed: 42250719
Change-Id: I2160cdb4e2c27e300dc2dd6365adaef89fdd1883
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/265876
Commit-Queue: dan sinclair <dsinclair@chromium.org>
Commit-Queue: James Price <jrprice@google.com>
Reviewed-by: James Price <jrprice@google.com>
Auto-Submit: dan sinclair <dsinclair@chromium.org>
diff --git a/src/tint/lang/spirv/reader/parser/parser.cc b/src/tint/lang/spirv/reader/parser/parser.cc
index 1ce3f6d..70d322f 100644
--- a/src/tint/lang/spirv/reader/parser/parser.cc
+++ b/src/tint/lang/spirv/reader/parser/parser.cc
@@ -691,8 +691,11 @@
             }
             // ArrayStride is only handled on the array type for now
             if (array_stride > 0) {
-                TINT_ASSERT(type->kind() == spvtools::opt::analysis::Type::kArray ||
-                            type->kind() == spvtools::opt::analysis::Type::kRuntimeArray);
+                if (type->kind() != spvtools::opt::analysis::Type::kArray &&
+                    type->kind() != spvtools::opt::analysis::Type::kRuntimeArray) {
+                    TINT_UNREACHABLE()
+                        << "ArrayStride is only accepted on an Array or RuntimeArray";
+                }
             }
 
             switch (type->kind()) {