summaryrefslogtreecommitdiff
path: root/src/wasm/literal.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/wasm/literal.cpp')
-rw-r--r--src/wasm/literal.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/wasm/literal.cpp b/src/wasm/literal.cpp
index 608018d8b..b8a6c7e7a 100644
--- a/src/wasm/literal.cpp
+++ b/src/wasm/literal.cpp
@@ -65,10 +65,8 @@ Literal::Literal(const uint8_t init[16]) : type(Type::v128) {
memcpy(&v128, init, 16);
}
-Literal::Literal(std::shared_ptr<GCData> gcData, Type type)
- : gcData(gcData), type(type) {
- // Null data is only allowed if nullable.
- assert(gcData || type.isNullable());
+Literal::Literal(std::shared_ptr<GCData> gcData, HeapType type)
+ : gcData(gcData), type(type, gcData ? NonNullable : Nullable) {
// The type must be a proper type for GC data.
assert(isData());
}