summaryrefslogtreecommitdiff
path: root/src/passes/Print.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/passes/Print.cpp')
-rw-r--r--src/passes/Print.cpp10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/passes/Print.cpp b/src/passes/Print.cpp
index 6740bc8ed..dee23d67d 100644
--- a/src/passes/Print.cpp
+++ b/src/passes/Print.cpp
@@ -2102,14 +2102,10 @@ struct PrintExpressionContents
if (printUnreachableReplacement(curr)) {
return;
}
- if (curr->safety == RefCast::Unsafe) {
- printMedium(o, "ref.cast_nop ");
+ if (curr->type.isNullable()) {
+ printMedium(o, "ref.cast null ");
} else {
- if (curr->type.isNullable()) {
- printMedium(o, "ref.cast null ");
- } else {
- printMedium(o, "ref.cast ");
- }
+ printMedium(o, "ref.cast ");
}
printHeapType(o, curr->type.getHeapType(), wasm);
}