Files
kotlin-fork/compiler/testData/ir/irText/expressions/whenWithSubjectVariable.fir.txt
T
2019-11-29 13:53:05 +03:00

39 lines
2.6 KiB
Plaintext
Vendored

FILE fqName:<root> fileName:/whenWithSubjectVariable.kt
FUN name:foo visibility:public modality:FINAL <> () returnType:kotlin.Any
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun foo (): kotlin.Any declared in <root>'
CONST Int type=kotlin.Int value=1
FUN name:test visibility:public modality:FINAL <> () returnType:kotlin.Int
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun test (): kotlin.Int declared in <root>'
BLOCK type=kotlin.Int origin=WHEN
VAR name:y type:kotlin.Any [val]
CALL 'public final fun foo (): kotlin.Any declared in <root>' type=kotlin.Any origin=null
WHEN type=kotlin.Int origin=WHEN
BRANCH
if: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQ
arg0: GET_VAR 'val y: kotlin.Any [val] declared in <root>.test' type=kotlin.Any origin=null
arg1: CONST Int type=kotlin.Int value=42
then: CONST Int type=kotlin.Int value=1
BRANCH
if: TYPE_OP type=kotlin.Boolean origin=INSTANCEOF typeOperand=kotlin.String
GET_VAR 'val y: kotlin.Any [val] declared in <root>.test' type=kotlin.Any origin=null
then: CALL 'public open fun <get-length> (): kotlin.Int declared in kotlin.String' type=kotlin.Int origin=null
$this: GET_VAR 'val y: kotlin.Any [val] declared in <root>.test' type=kotlin.String origin=null
BRANCH
if: TYPE_OP type=kotlin.Boolean origin=NOT_INSTANCEOF typeOperand=kotlin.Int
GET_VAR 'val y: kotlin.Any [val] declared in <root>.test' type=kotlin.Any origin=null
then: CONST Int type=kotlin.Int value=2
BRANCH
if: ERROR_CALL 'Unresolved reference: <Inapplicable(INAPPLICABLE): [kotlin/ranges/IntRange.contains]>#' type=IrErrorType
GET_VAR 'val y: kotlin.Any [val] declared in <root>.test' type=kotlin.Any origin=null
then: CONST Int type=kotlin.Int value=3
BRANCH
if: ERROR_CALL 'Unresolved reference: <Inapplicable(INAPPLICABLE): [kotlin/ranges/IntRange.contains]>#' type=IrErrorType
GET_VAR 'val y: kotlin.Any [val] declared in <root>.test' type=kotlin.Any origin=null
then: CONST Int type=kotlin.Int value=4
BRANCH
if: CONST Boolean type=kotlin.Boolean value=true
then: CALL 'public final fun unaryMinus (): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=null
$this: CONST Int type=kotlin.Int value=1