Revert "KT-53146 Don't coerce Nothing? returned from "catch" clauses"

This reverts commit 903a5d69a4.
This commit is contained in:
Pavel Mikhailovskii
2022-10-10 13:36:44 +02:00
parent 8eb0ca705d
commit 5fdfd4a421
4 changed files with 1 additions and 33 deletions
@@ -1225,9 +1225,7 @@ class ExpressionCodegen(
val catchResult = catchBody.accept(this, catchBlockInfo)
if (savedValue != null) {
if (catchResult.irType != context.irBuiltIns.nothingNType) {
catchResult.materializeAt(tryAsmType, aTry.type, true)
}
catchResult.materializeAt(tryAsmType, aTry.type, true)
mv.store(savedValue, tryAsmType)
} else {
catchResult.discard()