summaryrefslogtreecommitdiff
path: root/src/wasm/literal.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/wasm/literal.cpp')
-rw-r--r--src/wasm/literal.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/wasm/literal.cpp b/src/wasm/literal.cpp
index a49fa1b62..6e9c3eaf4 100644
--- a/src/wasm/literal.cpp
+++ b/src/wasm/literal.cpp
@@ -57,8 +57,7 @@ Literal::Literal(Type type) : type(type) {
return;
}
- if (type.isRef() && type.getHeapType().isBasic() &&
- type.getHeapType().getBasic(Unshared) == HeapType::i31) {
+ if (type.isRef() && type.getHeapType().isMaybeShared(HeapType::i31)) {
assert(type.isNonNullable());
i32 = 0;
return;