summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/passes/Print.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/passes/Print.cpp b/src/passes/Print.cpp
index 0b15477ee..bbf5f2a6b 100644
--- a/src/passes/Print.cpp
+++ b/src/passes/Print.cpp
@@ -2229,10 +2229,9 @@ struct PrintExpressionContents
o << ' ';
if (curr->ref->type == Type::unreachable) {
// Need to print some reference type in the correct hierarchy rather
- // than unreachable, and the bottom type is valid in the most
- // contexts.
- printType(
- Type(curr->castType.getHeapType().getBottom(), NonNullable));
+ // than unreachable, and the cast type itself is the best possible
+ // option.
+ printType(curr->castType);
} else {
printType(curr->ref->type);
}
@@ -2244,8 +2243,7 @@ struct PrintExpressionContents
curr->name.print(o);
o << ' ';
if (curr->ref->type == Type::unreachable) {
- printType(
- Type(curr->castType.getHeapType().getBottom(), NonNullable));
+ printType(curr->castType);
} else {
printType(curr->ref->type);
}