From e8137784824bb2578b8ecbe2f76e09e20a1e5442 Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Mon, 12 Jul 2021 12:31:14 -0700 Subject: [Wasm GC] Add a isNonNullable() convenience method. NFC (#3978) --- src/wasm/literal.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/wasm/literal.cpp') diff --git a/src/wasm/literal.cpp b/src/wasm/literal.cpp index 4ff354e56..151ea83e5 100644 --- a/src/wasm/literal.cpp +++ b/src/wasm/literal.cpp @@ -34,7 +34,7 @@ Literal::Literal(Type type) : type(type) { // i31ref is special in that it is non-nullable, so we construct with zero i32 = 0; } else { - assert(type != Type::unreachable && (!type.isRef() || type.isNullable())); + assert(type != Type::unreachable && !type.isNonNullable()); if (isData()) { new (&gcData) std::shared_ptr(); } else if (type.isRtt()) { -- cgit v1.2.3