From eadb53c442209962f98dde22f3b769c691398cad Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Mon, 11 Jan 2021 21:11:03 +0000 Subject: [GC] More HeapType instead of Type (#3475) To handle both nullable and non-nullable i31s and other heap types, we cannot just look at the isBasic case (which is just one of the two). This may fix this issue on the release builder: https://github.com/WebAssembly/binaryen/runs/1669944081?check_suite_focus=true but the issue does not reproduce locally, so I worry it is something else... --- src/literal.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/literal.h') diff --git a/src/literal.h b/src/literal.h index 5b590e07f..fb5396147 100644 --- a/src/literal.h +++ b/src/literal.h @@ -279,7 +279,7 @@ public: return i32; } int32_t geti31(bool signed_ = true) const { - assert(type == Type::i31ref); + assert(type.getHeapType() == HeapType::i31); return signed_ ? (i32 << 1) >> 1 : i32; } int64_t geti64() const { -- cgit v1.2.3