[FIR2IR] Add Unit coercion for non-last expressions in try/catch blocks

^KT-61088 Fixed
This commit is contained in:
Sergej Jaskiewicz
2024-02-06 18:21:19 +01:00
committed by Space Team
parent 3d66511ca7
commit 88b80e0ed2
6 changed files with 27 additions and 3 deletions
@@ -16,14 +16,17 @@ fun test1() {
fun test2(): Int {
return try { // BLOCK
println()
100 /*~> Unit */
42
}
catch (e: Throwable){ // BLOCK
println()
101 /*~> Unit */
24
}
finally { // BLOCK
println()
102 /*~> Unit */
555 /*~> Unit */
}
}