FIR: Support SAM constructors

This commit is contained in:
Denis Zharkov
2019-09-17 13:05:01 +07:00
parent b3e96a1fcf
commit 2bdbed978b
19 changed files with 443 additions and 48 deletions
+8 -7
View File
@@ -1,11 +1,12 @@
FILE fqName:<root> fileName:/samAdapter.kt
FUN name:test1 visibility:public modality:FINAL <> () returnType:kotlin.Unit
BLOCK_BODY
VAR name:hello type:IrErrorType [val]
ERROR_CALL 'Unresolved reference: <Unresolved name: Runnable>#' type=IrErrorType
FUN_EXPR type=IrErrorType origin=LAMBDA
FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> () returnType:IrErrorType
VAR name:hello type:java.lang.Runnable [val]
CALL 'public final fun Runnable (block: kotlin.Function0<kotlin.Unit>): java.lang.Runnable declared in java.lang' type=java.lang.Runnable origin=null
block: FUN_EXPR type=kotlin.Function0<kotlin.Unit> origin=LAMBDA
FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> () returnType:kotlin.Unit
BLOCK_BODY
ERROR_CALL 'Unresolved reference: println#' type=IrErrorType
CONST String type=IrErrorType value="Hello, world!"
ERROR_CALL 'Unresolved reference: <Inapplicable(PARAMETER_MAPPING_ERROR): [kotlin/run]>#' type=IrErrorType
CALL 'public final fun println (message: kotlin.Any?): kotlin.Unit [inline] declared in kotlin.io' type=kotlin.Unit origin=null
message: CONST String type=kotlin.String value="Hello, world!"
CALL 'public abstract fun run (): kotlin.Unit declared in java.lang.Runnable' type=kotlin.Unit origin=null
$this: GET_VAR 'val hello: java.lang.Runnable [val] declared in <root>.test1' type=java.lang.Runnable origin=null