summaryrefslogtreecommitdiff
path: root/src/ir/literal-utils.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/ir/literal-utils.h')
-rw-r--r--src/ir/literal-utils.h10
1 files changed, 1 insertions, 9 deletions
diff --git a/src/ir/literal-utils.h b/src/ir/literal-utils.h
index ad022344e..0131ecdc9 100644
--- a/src/ir/literal-utils.h
+++ b/src/ir/literal-utils.h
@@ -33,17 +33,9 @@ inline bool canMakeZero(Type type) {
if (type.isNonNullable()) {
return false;
}
- if (type.isRtt() && type.getRtt().hasDepth()) {
- // An rtt with depth cannot be constructed as a simple zero: we'd need to
- // create not just a zero (an rtt.canon) but also some rtt.subs that add to
- // the depth, so disallow that. Also, there is no practical way to create a
- // zero Literal for such a type, as we'd need to supply the list of super
- // types somehow, and creating a zero Literal is how makeZero works.
- return false;
- }
if (type.isTuple()) {
for (auto t : type) {
- if (!canMakeZero(t)) {
+ if (t.isNonNullable()) {
return false;
}
}