diff options
Diffstat (limited to 'src/wasm/literal.cpp')
-rw-r--r-- | src/wasm/literal.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/wasm/literal.cpp b/src/wasm/literal.cpp index 05f9d93d5..684108581 100644 --- a/src/wasm/literal.cpp +++ b/src/wasm/literal.cpp @@ -101,6 +101,7 @@ Literal::Literal(const Literal& other) : type(other.type) { auto heapType = type.getHeapType(); if (heapType.isBasic()) { switch (heapType.getBasic()) { + case HeapType::ext: case HeapType::any: case HeapType::eq: return; // null @@ -464,6 +465,10 @@ std::ostream& operator<<(std::ostream& o, Literal literal) { } } else { switch (literal.type.getHeapType().getBasic()) { + case HeapType::ext: + assert(literal.isNull() && "unexpected non-null externref literal"); + o << "externref(null)"; + break; case HeapType::any: assert(literal.isNull() && "unexpected non-null anyref literal"); o << "anyref(null)"; |