summaryrefslogtreecommitdiff
path: root/src/ir/properties.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/ir/properties.h')
-rw-r--r--src/ir/properties.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/ir/properties.h b/src/ir/properties.h
index 0c6824e4a..ac61f787e 100644
--- a/src/ir/properties.h
+++ b/src/ir/properties.h
@@ -93,10 +93,10 @@ inline bool isConstantExpression(const Expression* curr) {
inline Literal getSingleLiteral(const Expression* curr) {
if (auto* c = curr->dynCast<Const>()) {
return c->value;
- } else if (curr->is<RefNull>()) {
- return Literal(Type::nullref);
- } else if (auto* c = curr->dynCast<RefFunc>()) {
- return Literal(c->func);
+ } else if (auto* n = curr->dynCast<RefNull>()) {
+ return Literal(n->type);
+ } else if (auto* r = curr->dynCast<RefFunc>()) {
+ return Literal(r->func);
} else {
WASM_UNREACHABLE("non-constant expression");
}