[FIR2IR] Don't replace while loop and when branch body blocks with single expression. Skip some empty blocks.

https://youtrack.jetbrains.com/issue/KT-60264/K2-while-loop-body-block-sometimes-replaced-with-single-expression

Merge-request: KT-MR-12035
Merged-by: Vladimir Sukharev <Vladimir.Sukharev@jetbrains.com>
This commit is contained in:
Vladimir Sukharev
2023-09-18 15:27:19 +00:00
committed by Space Team
parent f4df4f8007
commit 9a2eff6487
61 changed files with 601 additions and 1102 deletions
@@ -119,5 +119,6 @@ FILE fqName:<root> fileName:/forWithImplicitReceivers.kt
CALL 'public open fun next (): kotlin.Int declared in <root>.IReceiver' type=kotlin.Int origin=null
$this: GET_VAR '<this>: <root>.IReceiver declared in <root>.test' type=<root>.IReceiver origin=null
$receiver: GET_VAR 'val tmp_1: <root>.IntCell declared in <root>.test' type=<root>.IntCell origin=null
CALL 'public final fun println (message: kotlin.Int): kotlin.Unit declared in kotlin.io' type=kotlin.Unit origin=null
message: GET_VAR 'val i: kotlin.Int declared in <root>.test' type=kotlin.Int origin=null
BLOCK type=kotlin.Unit origin=null
CALL 'public final fun println (message: kotlin.Int): kotlin.Unit declared in kotlin.io' type=kotlin.Unit origin=null
message: GET_VAR 'val i: kotlin.Int declared in <root>.test' type=kotlin.Int origin=null