Files
kotlin-fork/compiler/testData/ir/irText/js/dynamic/dynamicWithSmartCast.txt
T
Sergej Jaskiewicz 17a8fd2c0b [test] Move irJsText tests to irText directory
So that all irText tests could be found in one place
2023-03-22 15:18:15 +00:00

30 lines
1.9 KiB
Plaintext
Vendored

FILE fqName:<root> fileName:/dynamicWithSmartCast.kt
FUN name:test1 visibility:public modality:FINAL <> (d:dynamic) returnType:kotlin.Int
VALUE_PARAMETER name:d index:0 type:dynamic
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun test1 (d: dynamic): kotlin.Int declared in <root>'
WHEN type=kotlin.Int origin=IF
BRANCH
if: TYPE_OP type=kotlin.Boolean origin=INSTANCEOF typeOperand=kotlin.String
GET_VAR 'd: dynamic declared in <root>.test1' type=dynamic origin=null
then: CALL 'public open fun <get-length> (): kotlin.Int declared in kotlin.String' type=kotlin.Int origin=GET_PROPERTY
$this: TYPE_OP type=kotlin.String origin=IMPLICIT_DYNAMIC_CAST typeOperand=kotlin.String
GET_VAR 'd: dynamic declared in <root>.test1' type=dynamic origin=null
BRANCH
if: CONST Boolean type=kotlin.Boolean value=true
then: CONST Int type=kotlin.Int value=-1
FUN name:test2 visibility:public modality:FINAL <> (d:dynamic) returnType:kotlin.Int
VALUE_PARAMETER name:d index:0 type:dynamic
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun test2 (d: dynamic): kotlin.Int declared in <root>'
WHEN type=kotlin.Int origin=IF
BRANCH
if: TYPE_OP type=kotlin.Boolean origin=INSTANCEOF typeOperand=kotlin.Array<*>
GET_VAR 'd: dynamic declared in <root>.test2' type=dynamic origin=null
then: CALL 'public final fun <get-size> (): kotlin.Int declared in kotlin.Array' type=kotlin.Int origin=GET_PROPERTY
$this: TYPE_OP type=kotlin.Array<out kotlin.Any?> origin=IMPLICIT_DYNAMIC_CAST typeOperand=kotlin.Array<out kotlin.Any?>
GET_VAR 'd: dynamic declared in <root>.test2' type=dynamic origin=null
BRANCH
if: CONST Boolean type=kotlin.Boolean value=true
then: CONST Int type=kotlin.Int value=-1