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.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/ir/properties.h b/src/ir/properties.h
index ccb2392b0..09486ee34 100644
--- a/src/ir/properties.h
+++ b/src/ir/properties.h
@@ -119,7 +119,8 @@ inline Literal getLiteral(const Expression* curr) {
return Literal(r->func, r->type.getHeapType());
} else if (auto* i = curr->dynCast<RefI31>()) {
if (auto* c = i->value->dynCast<Const>()) {
- return Literal::makeI31(c->value.geti32());
+ return Literal::makeI31(c->value.geti32(),
+ i->type.getHeapType().getShared());
}
} else if (auto* s = curr->dynCast<StringConst>()) {
return Literal(s->string.toString());