summaryrefslogtreecommitdiff
path: root/src/wasm/literal.cpp
diff options
context:
space:
mode:
authorAlon Zakai <azakai@google.com>2021-07-12 12:31:14 -0700
committerGitHub <noreply@github.com>2021-07-12 12:31:14 -0700
commite8137784824bb2578b8ecbe2f76e09e20a1e5442 (patch)
treecf0e790b55e8b639168c5c42d22c28c02fb746b7 /src/wasm/literal.cpp
parent22167e5c6e34773a9fbc52e11648a081d2731ca3 (diff)
downloadbinaryen-e8137784824bb2578b8ecbe2f76e09e20a1e5442.tar.gz
binaryen-e8137784824bb2578b8ecbe2f76e09e20a1e5442.tar.bz2
binaryen-e8137784824bb2578b8ecbe2f76e09e20a1e5442.zip
[Wasm GC] Add a isNonNullable() convenience method. NFC (#3978)
Diffstat (limited to 'src/wasm/literal.cpp')
-rw-r--r--src/wasm/literal.cpp2
1 files changed, 1 insertions, 1 deletions
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<GCData>();
} else if (type.isRtt()) {