FIR: Support SAM constructors
This commit is contained in:
@@ -1,25 +1,25 @@
|
||||
FILE fqName:<root> fileName:/samConstructors.kt
|
||||
FUN name:test1 visibility:public modality:FINAL <> () returnType:IrErrorType
|
||||
FUN name:test1 visibility:public modality:FINAL <> () returnType:java.lang.Runnable
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun test1 (): IrErrorType declared in <root>'
|
||||
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
|
||||
RETURN type=kotlin.Nothing from='public final fun test1 (): java.lang.Runnable declared in <root>'
|
||||
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
|
||||
GET_OBJECT 'CLASS IR_EXTERNAL_DECLARATION_STUB OBJECT name:Unit modality:FINAL visibility:public superTypes:[kotlin.Any]' type=kotlin.Unit
|
||||
FUN name:test2 visibility:public modality:FINAL <> (a:kotlin.Function0<kotlin.Unit>) returnType:IrErrorType
|
||||
FUN name:test2 visibility:public modality:FINAL <> (a:kotlin.Function0<kotlin.Unit>) returnType:java.lang.Runnable
|
||||
VALUE_PARAMETER name:a index:0 type:kotlin.Function0<kotlin.Unit>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun test2 (a: kotlin.Function0<kotlin.Unit>): IrErrorType declared in <root>'
|
||||
ERROR_CALL 'Unresolved reference: <Unresolved name: Runnable>#' type=IrErrorType
|
||||
GET_VAR 'a: kotlin.Function0<kotlin.Unit> declared in <root>.test2' type=kotlin.Function0<kotlin.Unit> origin=null
|
||||
RETURN type=kotlin.Nothing from='public final fun test2 (a: kotlin.Function0<kotlin.Unit>): java.lang.Runnable declared in <root>'
|
||||
CALL 'public final fun Runnable (block: kotlin.Function0<kotlin.Unit>): java.lang.Runnable declared in java.lang' type=java.lang.Runnable origin=null
|
||||
block: GET_VAR 'a: kotlin.Function0<kotlin.Unit> declared in <root>.test2' type=kotlin.Function0<kotlin.Unit> origin=null
|
||||
FUN name:foo visibility:public modality:FINAL <> () returnType:kotlin.Unit
|
||||
BLOCK_BODY
|
||||
FUN name:test3 visibility:public modality:FINAL <> () returnType:IrErrorType
|
||||
FUN name:test3 visibility:public modality:FINAL <> () returnType:java.lang.Runnable
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun test3 (): IrErrorType declared in <root>'
|
||||
ERROR_CALL 'Unresolved reference: <Unresolved name: Runnable>#' type=IrErrorType
|
||||
ERROR_CALL 'Unsupported callable reference: ::<Unresolved name: foo>#' type=IrErrorType
|
||||
RETURN type=kotlin.Nothing from='public final fun test3 (): java.lang.Runnable declared in <root>'
|
||||
CALL 'public final fun Runnable (block: kotlin.Function0<kotlin.Unit>): java.lang.Runnable declared in java.lang' type=java.lang.Runnable origin=null
|
||||
block: ERROR_CALL 'Unsupported callable reference: ::<Unresolved name: foo>#' type=IrErrorType
|
||||
FUN name:test4 visibility:public modality:FINAL <> () returnType:IrErrorType
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun test4 (): IrErrorType declared in <root>'
|
||||
|
||||
+21
-21
@@ -1,22 +1,22 @@
|
||||
FILE fqName:<root> fileName:/samConversionToGeneric.kt
|
||||
FUN name:test1 visibility:public modality:FINAL <> () returnType:IrErrorType
|
||||
FUN name:test1 visibility:public modality:FINAL <> () returnType:<root>.J<kotlin.String>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun test1 (): IrErrorType declared in <root>'
|
||||
ERROR_CALL 'Unresolved reference: <Unresolved name: J>#' type=IrErrorType
|
||||
FUN_EXPR type=IrErrorType origin=LAMBDA
|
||||
FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> (x:IrErrorType) returnType:IrErrorType
|
||||
VALUE_PARAMETER name:x index:0 type:IrErrorType
|
||||
BLOCK_BODY
|
||||
ERROR_CALL 'Unresolved reference: x#' type=IrErrorType
|
||||
FUN name:test2 visibility:public modality:FINAL <> () returnType:IrErrorType
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun test2 (): IrErrorType declared in <root>'
|
||||
ERROR_CALL 'Unresolved reference: <Unresolved name: J>#' type=IrErrorType
|
||||
FUN_EXPR type=IrErrorType origin=LAMBDA
|
||||
FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> (x:kotlin.String) returnType:IrErrorType
|
||||
RETURN type=kotlin.Nothing from='public final fun test1 (): <root>.J<kotlin.String> declared in <root>'
|
||||
CALL 'public final fun J (block: kotlin.Function1<T of <uninitialized parent>?, T of <uninitialized parent>?>): <root>.J<T of <uninitialized parent>> declared in <root>' type=<root>.J<kotlin.String> origin=null
|
||||
block: FUN_EXPR type=kotlin.Function1<kotlin.String, kotlin.String> origin=LAMBDA
|
||||
FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> (x:kotlin.String) returnType:kotlin.String
|
||||
VALUE_PARAMETER name:x index:0 type:kotlin.String
|
||||
BLOCK_BODY
|
||||
ERROR_CALL 'Unresolved reference: x#' type=IrErrorType
|
||||
GET_VAR 'x: kotlin.String declared in <root>.test1.<anonymous>' type=kotlin.String origin=null
|
||||
FUN name:test2 visibility:public modality:FINAL <> () returnType:<root>.J<kotlin.String>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun test2 (): <root>.J<kotlin.String> declared in <root>'
|
||||
CALL 'public final fun J (block: kotlin.Function1<T of <uninitialized parent>?, T of <uninitialized parent>?>): <root>.J<T of <uninitialized parent>> declared in <root>' type=<root>.J<kotlin.String> origin=null
|
||||
block: FUN_EXPR type=kotlin.Function1<kotlin.String, kotlin.String> origin=LAMBDA
|
||||
FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> (x:kotlin.String) returnType:kotlin.String
|
||||
VALUE_PARAMETER name:x index:0 type:kotlin.String
|
||||
BLOCK_BODY
|
||||
GET_VAR 'x: kotlin.String declared in <root>.test2.<anonymous>' type=kotlin.String origin=null
|
||||
FUN name:test3 visibility:public modality:FINAL <> () returnType:kotlin.Unit
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun test3 (): kotlin.Unit declared in <root>'
|
||||
@@ -54,12 +54,12 @@ FILE fqName:<root> fileName:/samConversionToGeneric.kt
|
||||
GET_VAR 'a: kotlin.Any declared in <root>.test7' type=kotlin.Any origin=null
|
||||
CALL 'public open fun bar (j: <root>.J<X of <uninitialized parent>?>?): kotlin.Unit declared in <root>.H' type=kotlin.Unit origin=null
|
||||
j: GET_VAR 'a: kotlin.Any declared in <root>.test7' type=kotlin.Function1<T of <root>.test7, T of <root>.test7> origin=null
|
||||
FUN name:test8 visibility:public modality:FINAL <> (efn:kotlin.Function1<kotlin.String, kotlin.String>) returnType:IrErrorType
|
||||
FUN name:test8 visibility:public modality:FINAL <> (efn:kotlin.Function1<kotlin.String, kotlin.String>) returnType:<root>.J<kotlin.String>
|
||||
VALUE_PARAMETER name:efn index:0 type:kotlin.Function1<kotlin.String, kotlin.String>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun test8 (efn: kotlin.Function1<kotlin.String, kotlin.String>): IrErrorType declared in <root>'
|
||||
ERROR_CALL 'Unresolved reference: <Unresolved name: J>#' type=IrErrorType
|
||||
GET_VAR 'efn: kotlin.Function1<kotlin.String, kotlin.String> declared in <root>.test8' type=kotlin.Function1<kotlin.String, kotlin.String> origin=null
|
||||
RETURN type=kotlin.Nothing from='public final fun test8 (efn: kotlin.Function1<kotlin.String, kotlin.String>): <root>.J<kotlin.String> declared in <root>'
|
||||
CALL 'public final fun J (block: kotlin.Function1<T of <uninitialized parent>?, T of <uninitialized parent>?>): <root>.J<T of <uninitialized parent>> declared in <root>' type=<root>.J<kotlin.String> origin=null
|
||||
block: GET_VAR 'efn: kotlin.Function1<kotlin.String, kotlin.String> declared in <root>.test8' type=kotlin.Function1<kotlin.String, kotlin.String> origin=null
|
||||
FUN name:test9 visibility:public modality:FINAL <> (efn:kotlin.Function1<kotlin.String, kotlin.String>) returnType:kotlin.Unit
|
||||
VALUE_PARAMETER name:efn index:0 type:kotlin.Function1<kotlin.String, kotlin.String>
|
||||
BLOCK_BODY
|
||||
@@ -68,5 +68,5 @@ FILE fqName:<root> fileName:/samConversionToGeneric.kt
|
||||
FUN name:test10 visibility:public modality:FINAL <> (fn:kotlin.Function1<kotlin.Int, kotlin.String>) returnType:kotlin.Unit
|
||||
VALUE_PARAMETER name:fn index:0 type:kotlin.Function1<kotlin.Int, kotlin.String>
|
||||
BLOCK_BODY
|
||||
ERROR_CALL 'Unresolved reference: <Inapplicable(INAPPLICABLE): [/H.bar2x]>#' type=IrErrorType
|
||||
GET_VAR 'fn: kotlin.Function1<kotlin.Int, kotlin.String> declared in <root>.test10' type=kotlin.Function1<kotlin.Int, kotlin.String> origin=null
|
||||
CALL 'public open fun bar2x (j2x: <root>.J2X<Y of <uninitialized parent>?>?): kotlin.Unit declared in <root>.H' type=kotlin.Unit origin=null
|
||||
j2x: GET_VAR 'fn: kotlin.Function1<kotlin.Int, kotlin.String> declared in <root>.test10' type=kotlin.Function1<kotlin.Int, kotlin.String> origin=null
|
||||
|
||||
+8
-7
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user