diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/wasm/wasm-binary.cpp | 2 | ||||
-rw-r--r-- | src/wasm/wasm-s-parser.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/wasm/wasm-binary.cpp b/src/wasm/wasm-binary.cpp index 1f54a0038..d5579eedf 100644 --- a/src/wasm/wasm-binary.cpp +++ b/src/wasm/wasm-binary.cpp @@ -6417,7 +6417,7 @@ void WasmBinaryBuilder::validateHeapTypeUsingChild(Expression* child, return; } if ((!child->type.isRef() && !child->type.isRtt()) || - child->type.getHeapType() != heapType) { + !HeapType::isSubType(child->type.getHeapType(), heapType)) { throwError("bad heap type: expected " + heapType.toString() + " but found " + child->type.toString()); } diff --git a/src/wasm/wasm-s-parser.cpp b/src/wasm/wasm-s-parser.cpp index 1271ff603..11121ced6 100644 --- a/src/wasm/wasm-s-parser.cpp +++ b/src/wasm/wasm-s-parser.cpp @@ -3451,7 +3451,7 @@ void SExpressionWasmBuilder::validateHeapTypeUsingChild(Expression* child, return; } if ((!child->type.isRef() && !child->type.isRtt()) || - child->type.getHeapType() != heapType) { + !HeapType::isSubType(child->type.getHeapType(), heapType)) { throw ParseException("bad heap type: expected " + heapType.toString() + " but found " + child->type.toString(), s.line, |