[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:
committed by
Space Team
parent
f4df4f8007
commit
9a2eff6487
@@ -30,11 +30,12 @@ FILE fqName:<root> fileName:/Box.kt
|
||||
BRANCH
|
||||
if: TYPE_OP type=kotlin.Boolean origin=INSTANCEOF typeOperand=<root>.Foo.Buz
|
||||
GET_VAR 'var foo: <root>.Foo declared in <root>.Box.<get-str>' type=<root>.Foo origin=null
|
||||
then: RETURN type=kotlin.Nothing from='public final fun <get-str> (): kotlin.String declared in <root>.Box'
|
||||
TYPE_OP type=kotlin.String origin=IMPLICIT_NOTNULL typeOperand=kotlin.String
|
||||
GET_FIELD 'FIELD IR_EXTERNAL_JAVA_DECLARATION_STUB name:str type:@[FlexibleNullability] kotlin.String? visibility:public' type=@[FlexibleNullability] kotlin.String? origin=GET_PROPERTY
|
||||
receiver: TYPE_OP type=<root>.Foo.Buz origin=IMPLICIT_CAST typeOperand=<root>.Foo.Buz
|
||||
GET_VAR 'var foo: <root>.Foo declared in <root>.Box.<get-str>' type=<root>.Foo origin=null
|
||||
then: BLOCK type=kotlin.Unit origin=null
|
||||
RETURN type=kotlin.Nothing from='public final fun <get-str> (): kotlin.String declared in <root>.Box'
|
||||
TYPE_OP type=kotlin.String origin=IMPLICIT_NOTNULL typeOperand=kotlin.String
|
||||
GET_FIELD 'FIELD IR_EXTERNAL_JAVA_DECLARATION_STUB name:str type:@[FlexibleNullability] kotlin.String? visibility:public' type=@[FlexibleNullability] kotlin.String? origin=GET_PROPERTY
|
||||
receiver: TYPE_OP type=<root>.Foo.Buz origin=IMPLICIT_CAST typeOperand=<root>.Foo.Buz
|
||||
GET_VAR 'var foo: <root>.Foo declared in <root>.Box.<get-str>' type=<root>.Foo origin=null
|
||||
RETURN type=kotlin.Nothing from='public final fun <get-str> (): kotlin.String declared in <root>.Box'
|
||||
CONST String type=kotlin.String value=""
|
||||
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator]
|
||||
|
||||
Reference in New Issue
Block a user