diff options
Diffstat (limited to 'src/wasm/literal.cpp')
-rw-r--r-- | src/wasm/literal.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/wasm/literal.cpp b/src/wasm/literal.cpp index f13ea504f..20b6b7234 100644 --- a/src/wasm/literal.cpp +++ b/src/wasm/literal.cpp @@ -57,7 +57,8 @@ Literal::Literal(Type type) : type(type) { return; } - if (type.isRef() && type.getHeapType() == HeapType::i31) { + if (type.isRef() && type.getHeapType().isBasic() && + type.getHeapType().getBasic(Unshared) == HeapType::i31) { assert(type.isNonNullable()); i32 = 0; return; |