diff options
Diffstat (limited to 'src/ir/possible-constant.h')
-rw-r--r-- | src/ir/possible-constant.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/ir/possible-constant.h b/src/ir/possible-constant.h index b3272461d..21f1cfa65 100644 --- a/src/ir/possible-constant.h +++ b/src/ir/possible-constant.h @@ -114,8 +114,14 @@ public: auto type = getConstantLiteral().type.getHeapType(); auto otherType = other.getConstantLiteral().type.getHeapType(); auto lub = HeapType::getLeastUpperBound(type, otherType); - if (lub != type) { - value = Literal::makeNull(lub); + if (!lub) { + // TODO: Remove this workaround once we have bottom types to assign to + // null literals. + value = Many(); + return true; + } + if (*lub != type) { + value = Literal::makeNull(*lub); return true; } return false; |