Files
kotlin-fork/compiler/testData/ir/irText/expressions/argumentMappedWithError.txt
T
Steven Schäfer 0da4b06074 psi2ir: Fix return insertion
We should only insert a return statement at the end of a lambda or
function if the final statement is used as an expression (slice
USED_AS_RESULT_OF_LAMBDA and USED_AS_EXPRESSION).
2019-10-31 11:13:44 +03:00

19 lines
1.2 KiB
Plaintext
Vendored

FILE fqName:<root> fileName:/argumentMappedWithError.kt
FUN name:convert visibility:public modality:FINAL <R> ($receiver:kotlin.Number) returnType:R of <root>.convert
TYPE_PARAMETER name:R index:0 variance: superTypes:[kotlin.Number]
$receiver: VALUE_PARAMETER name:<this> type:kotlin.Number
BLOCK_BODY
CALL 'public final fun TODO (): kotlin.Nothing [inline] declared in kotlin' type=kotlin.Nothing origin=null
FUN name:foo visibility:public modality:FINAL <> (arg:kotlin.Number) returnType:kotlin.Unit
VALUE_PARAMETER name:arg index:0 type:kotlin.Number
BLOCK_BODY
FUN name:main visibility:public modality:FINAL <> (args:kotlin.Array<kotlin.String>) returnType:kotlin.Unit
VALUE_PARAMETER name:args index:0 type:kotlin.Array<kotlin.String>
BLOCK_BODY
VAR name:x type:kotlin.Int [val]
CONST Int type=kotlin.Int value=0
CALL 'public final fun foo (arg: kotlin.Number): kotlin.Unit declared in <root>' type=kotlin.Unit origin=null
arg: CALL 'public final fun convert <R> (): R of <root>.convert declared in <root>' type=kotlin.Number origin=null
<R>: kotlin.Number
$receiver: GET_VAR 'val x: kotlin.Int [val] declared in <root>.main' type=kotlin.Int origin=null