Revert PR #3093 (#3131)
* Change is now under active discussion in Khronos
diff --git a/source/operand.cpp b/source/operand.cpp
index 00782cd..39d17a6 100644
--- a/source/operand.cpp
+++ b/source/operand.cpp
@@ -503,6 +503,9 @@
case SpvOpTypeForwardPointer:
out = [](unsigned index) { return index == 0; };
break;
+ case SpvOpTypeArray:
+ out = [](unsigned index) { return index == 1; };
+ break;
default:
out = [](unsigned) { return false; };
break;
diff --git a/test/val/val_id_test.cpp b/test/val/val_id_test.cpp
index f3240fb..019d91a 100644
--- a/test/val/val_id_test.cpp
+++ b/test/val/val_id_test.cpp
@@ -6572,25 +6572,6 @@
"Operand 3[%_ptr_Uniform__struct_2] requires a previous definition"));
}
-TEST_F(ValidateIdWithMessage, ArrayTypeForwardReference) {
- const std::string spirv = R"(
-OpCapability Linkage
-OpCapability MinLod
-OpCapability GenericPointer
-OpMemoryModel Logical Simple
-OpName %_ptr_Input__arr_9_uint_7 "ptr"
-%uint = OpTypeInt 32 0
-%uint_7 = OpConstant %uint 7
-%_arr_9_uint_7 = OpTypeArray %_ptr_Input__arr_9_uint_7 %uint_7
-%_ptr_Input__arr_9_uint_7 = OpTypePointer Input %_arr_9_uint_7
-)";
-
- CompileSuccessfully(spirv);
- EXPECT_EQ(SPV_ERROR_INVALID_ID, ValidateInstructions());
- EXPECT_THAT(getDiagnosticString(),
- HasSubstr("ID 1[%ptr] has not been defined"));
-}
-
} // namespace
} // namespace val
} // namespace spvtools