diff options
Diffstat (limited to 'src/wasm/wasm-validator.cpp')
-rw-r--r-- | src/wasm/wasm-validator.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/wasm/wasm-validator.cpp b/src/wasm/wasm-validator.cpp index 07f0a634b..7246a15a6 100644 --- a/src/wasm/wasm-validator.cpp +++ b/src/wasm/wasm-validator.cpp @@ -474,6 +474,7 @@ void FunctionValidator::visitCallIndirect(CallIndirect* curr) { void FunctionValidator::visitGetLocal(GetLocal* curr) { shouldBeTrue(curr->index < getFunction()->getNumLocals(), curr, "get_local index must be small enough"); shouldBeTrue(isConcreteType(curr->type), curr, "get_local must have a valid type - check what you provided when you constructed the node"); + shouldBeTrue(curr->type == getFunction()->getLocalType(curr->index), curr, "get_local must have proper type"); } void FunctionValidator::visitSetLocal(SetLocal* curr) { |