Add basic FIR -> IR converter with a set of text tests

Tests duplicate IrTextTestCaseGenerated
#KT-24065 Fixed
This commit is contained in:
Mikhail Glukhikh
2019-04-05 13:37:48 +03:00
parent 92adfd8946
commit 881073b1c9
305 changed files with 22829 additions and 57 deletions
@@ -0,0 +1,14 @@
FILE fqName:<root> fileName:/anonymousFunction.kt
PROPERTY name:anonymous visibility:public modality:FINAL [val]
FIELD PROPERTY_BACKING_FIELD name:anonymous type:IrErrorType visibility:public [final,static]
EXPRESSION_BODY
BLOCK type=IrErrorType origin=ANONYMOUS_FUNCTION
FUN name:<no name provided> visibility:local modality:FINAL <> () returnType:kotlin.Unit
BLOCK_BODY
CALL 'public final fun println (): kotlin.Unit [inline] declared in kotlin.io' type=kotlin.Unit origin=null
FUNCTION_REFERENCE 'local final fun <no name provided> (): kotlin.Unit declared in <root>.anonymous' type=IrErrorType origin=ANONYMOUS_FUNCTION
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-anonymous> visibility:public modality:FINAL <> () returnType:IrErrorType
correspondingProperty: PROPERTY name:anonymous visibility:public modality:FINAL [val]
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun <get-anonymous> (): IrErrorType declared in <root>'
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:anonymous type:IrErrorType visibility:public [final,static] ' type=IrErrorType origin=null
@@ -0,0 +1,71 @@
FILE fqName:<root> fileName:/destructuringInLambda.kt
CLASS CLASS name:A modality:FINAL visibility:public [data] superTypes:[kotlin.Any]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.A
CONSTRUCTOR visibility:public <> (x:kotlin.Int, y:kotlin.Int) returnType:<root>.A [primary]
VALUE_PARAMETER name:x index:0 type:kotlin.Int
VALUE_PARAMETER name:y index:1 type:kotlin.Int
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:A modality:FINAL visibility:public [data] superTypes:[kotlin.Any]'
PROPERTY name:x visibility:public modality:FINAL [val]
FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:public [final]
EXPRESSION_BODY
GET_VAR 'x: kotlin.Int declared in <root>.A.<init>' type=kotlin.Int origin=INITIALIZE_PROPERTY_FROM_PARAMETER
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-x> visibility:public modality:FINAL <> ($this:<root>.A) returnType:kotlin.Int
correspondingProperty: PROPERTY name:x visibility:public modality:FINAL [val]
$this: VALUE_PARAMETER name:<this> type:<root>.A
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun <get-x> (): kotlin.Int declared in <root>.A'
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:public [final] ' type=kotlin.Int origin=null
receiver: GET_VAR '<this>: <root>.A declared in <root>.A.<get-x>' type=<root>.A origin=null
PROPERTY name:y visibility:public modality:FINAL [val]
FIELD PROPERTY_BACKING_FIELD name:y type:kotlin.Int visibility:public [final]
EXPRESSION_BODY
GET_VAR 'y: kotlin.Int declared in <root>.A.<init>' type=kotlin.Int origin=INITIALIZE_PROPERTY_FROM_PARAMETER
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-y> visibility:public modality:FINAL <> ($this:<root>.A) returnType:kotlin.Int
correspondingProperty: PROPERTY name:y visibility:public modality:FINAL [val]
$this: VALUE_PARAMETER name:<this> type:<root>.A
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun <get-y> (): kotlin.Int declared in <root>.A'
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:y type:kotlin.Int visibility:public [final] ' type=kotlin.Int origin=null
receiver: GET_VAR '<this>: <root>.A declared in <root>.A.<get-y>' type=<root>.A origin=null
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean
overridden:
public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
VALUE_PARAMETER name:other index:0 type:kotlin.Any?
FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int
overridden:
public open fun hashCode (): kotlin.Int declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String
overridden:
public open fun toString (): kotlin.String declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
PROPERTY name:fn visibility:public modality:FINAL [var]
FIELD PROPERTY_BACKING_FIELD name:fn type:kotlin.Function1 visibility:public [static]
EXPRESSION_BODY
BLOCK type=kotlin.Function1 origin=LAMBDA
FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> (<destruct>:IrErrorType) returnType:kotlin.Function1
VALUE_PARAMETER name:<destruct> index:0 type:IrErrorType
BLOCK_BODY
RETURN type=kotlin.Nothing from='local final fun <anonymous> (<destruct>: IrErrorType): kotlin.Function1 declared in <root>.fn'
BLOCK type=IrErrorType origin=null
VAR name:_ type:IrErrorType [val]
ERROR_CALL 'Unresolved reference: <Unresolved name: component1>#' type=IrErrorType
VAR name:y type:IrErrorType [val]
ERROR_CALL 'Unresolved reference: <Unresolved name: component2>#' type=IrErrorType
ERROR_CALL 'Unresolved reference: <Ambiguity: plus, [kotlin/Int.plus, kotlin/Int.plus, kotlin/Int.plus, kotlin/Int.plus, kotlin/Int.plus, kotlin/Int.plus]>#' type=IrErrorType
GET_VAR 'val y: IrErrorType [val] declared in <root>.fn.<anonymous>' type=IrErrorType origin=null
FUNCTION_REFERENCE 'local final fun <anonymous> (<destruct>: IrErrorType): kotlin.Function1 declared in <root>.fn' type=kotlin.Function1 origin=LAMBDA
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-fn> visibility:public modality:FINAL <> () returnType:kotlin.Function1
correspondingProperty: PROPERTY name:fn visibility:public modality:FINAL [var]
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun <get-fn> (): kotlin.Function1 declared in <root>'
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:fn type:kotlin.Function1 visibility:public [static] ' type=kotlin.Function1 origin=null
FUN DEFAULT_PROPERTY_ACCESSOR name:<set-fn> visibility:public modality:FINAL <> (<set-?>:kotlin.Function1) returnType:kotlin.Unit
correspondingProperty: PROPERTY name:fn visibility:public modality:FINAL [var]
VALUE_PARAMETER name:<set-?> index:0 type:kotlin.Function1
BLOCK_BODY
SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:fn type:kotlin.Function1 visibility:public [static] ' type=kotlin.Unit origin=null
value: GET_VAR '<set-?>: kotlin.Function1 declared in <root>.<set-fn>' type=kotlin.Function1 origin=null
@@ -0,0 +1,11 @@
FILE fqName:<root> fileName:/extensionLambda.kt
FUN name:test1 visibility:public modality:FINAL <> () returnType:IrErrorType
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun test1 (): IrErrorType declared in <root>'
ERROR_CALL 'Unresolved reference: <Ambiguity: run, [kotlin/run, kotlin/run]>#' type=IrErrorType
BLOCK type=IrErrorType origin=LAMBDA
FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> () returnType:IrErrorType
BLOCK_BODY
RETURN type=kotlin.Nothing from='local final fun <anonymous> (): IrErrorType declared in <root>.test1'
ERROR_CALL 'Unresolved reference: <Unresolved name: length>#' type=IrErrorType
FUNCTION_REFERENCE 'local final fun <anonymous> (): IrErrorType declared in <root>.test1' type=IrErrorType origin=LAMBDA
+29
View File
@@ -0,0 +1,29 @@
FILE fqName:<root> fileName:/justLambda.kt
PROPERTY name:test1 visibility:public modality:FINAL [val]
FIELD PROPERTY_BACKING_FIELD name:test1 type:IrErrorType visibility:public [final,static]
EXPRESSION_BODY
BLOCK type=IrErrorType origin=LAMBDA
FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> () returnType:IrErrorType
BLOCK_BODY
RETURN type=kotlin.Nothing from='local final fun <anonymous> (): IrErrorType declared in <root>.test1'
CONST Int type=IrErrorType value=42
FUNCTION_REFERENCE 'local final fun <anonymous> (): IrErrorType declared in <root>.test1' type=IrErrorType origin=LAMBDA
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-test1> visibility:public modality:FINAL <> () returnType:IrErrorType
correspondingProperty: PROPERTY name:test1 visibility:public modality:FINAL [val]
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun <get-test1> (): IrErrorType declared in <root>'
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:test1 type:IrErrorType visibility:public [final,static] ' type=IrErrorType origin=null
PROPERTY name:test2 visibility:public modality:FINAL [val]
FIELD PROPERTY_BACKING_FIELD name:test2 type:IrErrorType visibility:public [final,static]
EXPRESSION_BODY
BLOCK type=IrErrorType origin=LAMBDA
FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> () returnType:IrErrorType
BLOCK_BODY
RETURN type=kotlin.Nothing from='local final fun <anonymous> (): IrErrorType declared in <root>.test2'
GET_OBJECT 'CLASS IR_EXTERNAL_DECLARATION_STUB OBJECT name:Unit modality:FINAL visibility:public superTypes:[kotlin.Any]' type=kotlin.Unit
FUNCTION_REFERENCE 'local final fun <anonymous> (): IrErrorType declared in <root>.test2' type=IrErrorType origin=LAMBDA
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-test2> visibility:public modality:FINAL <> () returnType:IrErrorType
correspondingProperty: PROPERTY name:test2 visibility:public modality:FINAL [val]
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun <get-test2> (): IrErrorType declared in <root>'
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:test2 type:IrErrorType visibility:public [final,static] ' type=IrErrorType origin=null
@@ -0,0 +1,12 @@
FILE fqName:<root> fileName:/localFunction.kt
FUN name:outer visibility:public modality:FINAL <> () returnType:kotlin.Unit
BLOCK_BODY
VAR name:x type:kotlin.Int [var]
CONST Int type=kotlin.Int value=0
FUN name:local visibility:local modality:FINAL <> () returnType:kotlin.Unit
BLOCK_BODY
VAR name:<unary> type:kotlin.Int [val]
GET_VAR 'var x: kotlin.Int [var] declared in <root>.outer' type=kotlin.Int origin=null
ERROR_CALL 'Unresolved reference: R|<local>/x|' type=IrErrorType
GET_VAR 'val <unary>: kotlin.Int [val] declared in <root>.outer.local' type=kotlin.Int origin=null
CALL 'local final fun local (): kotlin.Unit declared in <local>' type=kotlin.Unit origin=null
@@ -0,0 +1,107 @@
FILE fqName:<root> fileName:/multipleImplicitReceivers.kt
CLASS OBJECT name:A modality:FINAL visibility:public superTypes:[kotlin.Any]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.A
CONSTRUCTOR visibility:private <> () returnType:<root>.A [primary]
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS OBJECT name:A modality:FINAL visibility:public superTypes:[kotlin.Any]'
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean
overridden:
public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
VALUE_PARAMETER name:other index:0 type:kotlin.Any?
FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int
overridden:
public open fun hashCode (): kotlin.Int declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String
overridden:
public open fun toString (): kotlin.String declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
CLASS OBJECT name:B modality:FINAL visibility:public superTypes:[kotlin.Any]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.B
CONSTRUCTOR visibility:private <> () returnType:<root>.B [primary]
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS OBJECT name:B modality:FINAL visibility:public superTypes:[kotlin.Any]'
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean
overridden:
public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
VALUE_PARAMETER name:other index:0 type:kotlin.Any?
FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int
overridden:
public open fun hashCode (): kotlin.Int declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String
overridden:
public open fun toString (): kotlin.String declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
CLASS INTERFACE name:IFoo modality:ABSTRACT visibility:public superTypes:[kotlin.Any]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.IFoo
PROPERTY name:foo visibility:public modality:OPEN [val]
FUN name:<get-foo> visibility:public modality:OPEN <> ($this:<root>.IFoo) returnType:<root>.B
correspondingProperty: PROPERTY name:foo visibility:public modality:OPEN [val]
$this: VALUE_PARAMETER name:<this> type:<root>.IFoo
BLOCK_BODY
RETURN type=kotlin.Nothing from='public open fun <get-foo> (): <root>.B declared in <root>.IFoo'
ERROR_CALL 'Unresolved reference: <Unresolved name: B>#' type=IrErrorType
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean
overridden:
public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
VALUE_PARAMETER name:other index:0 type:kotlin.Any?
FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int
overridden:
public open fun hashCode (): kotlin.Int declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String
overridden:
public open fun toString (): kotlin.String declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
CLASS INTERFACE name:IInvoke modality:ABSTRACT visibility:public superTypes:[kotlin.Any]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.IInvoke
FUN name:invoke visibility:public modality:OPEN <> ($this:<root>.IInvoke) returnType:kotlin.Int
$this: VALUE_PARAMETER name:<this> type:<root>.IInvoke
BLOCK_BODY
RETURN type=kotlin.Nothing from='public open fun invoke (): kotlin.Int declared in <root>.IInvoke'
CONST Int type=kotlin.Int value=42
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean
overridden:
public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
VALUE_PARAMETER name:other index:0 type:kotlin.Any?
FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int
overridden:
public open fun hashCode (): kotlin.Int declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String
overridden:
public open fun toString (): kotlin.String declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
FUN name:test visibility:public modality:FINAL <> (fooImpl:<root>.IFoo, invokeImpl:<root>.IInvoke) returnType:kotlin.Unit
VALUE_PARAMETER name:fooImpl index:0 type:<root>.IFoo
VALUE_PARAMETER name:invokeImpl index:1 type:<root>.IInvoke
BLOCK_BODY
CALL 'public final fun with (receiver: T of <uninitialized parent>, block: kotlin.Function1<T of <uninitialized parent>, R of <uninitialized parent>>): R of <uninitialized parent> [inline] declared in kotlin' type=R of <uninitialized parent> origin=null
receiver: ERROR_CALL 'Unresolved reference: <Unresolved name: A>#' type=IrErrorType
block: BLOCK type=IrErrorType origin=LAMBDA
FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> () returnType:IrErrorType
BLOCK_BODY
RETURN type=kotlin.Nothing from='local final fun <anonymous> (): IrErrorType declared in <root>.test'
CALL 'public final fun with (receiver: T of <uninitialized parent>, block: kotlin.Function1<T of <uninitialized parent>, R of <uninitialized parent>>): R of <uninitialized parent> [inline] declared in kotlin' type=R of <uninitialized parent> origin=null
receiver: GET_VAR 'fooImpl: <root>.IFoo declared in <root>.test' type=<root>.IFoo origin=null
block: BLOCK type=IrErrorType origin=LAMBDA
FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> () returnType:IrErrorType
BLOCK_BODY
RETURN type=kotlin.Nothing from='local final fun <anonymous> (): IrErrorType declared in <root>.test.<anonymous>'
CALL 'public final fun with (receiver: T of <uninitialized parent>, block: kotlin.Function1<T of <uninitialized parent>, R of <uninitialized parent>>): R of <uninitialized parent> [inline] declared in kotlin' type=R of <uninitialized parent> origin=null
receiver: GET_VAR 'invokeImpl: <root>.IInvoke declared in <root>.test' type=<root>.IInvoke origin=null
block: BLOCK type=IrErrorType origin=LAMBDA
FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> () returnType:IrErrorType
BLOCK_BODY
RETURN type=kotlin.Nothing from='local final fun <anonymous> (): IrErrorType declared in <root>.test.<anonymous>.<anonymous>'
ERROR_CALL 'Unresolved reference: <Unresolved name: foo>#' type=IrErrorType
FUNCTION_REFERENCE 'local final fun <anonymous> (): IrErrorType declared in <root>.test.<anonymous>.<anonymous>' type=IrErrorType origin=LAMBDA
FUNCTION_REFERENCE 'local final fun <anonymous> (): IrErrorType declared in <root>.test.<anonymous>' type=IrErrorType origin=LAMBDA
FUNCTION_REFERENCE 'local final fun <anonymous> (): IrErrorType declared in <root>.test' type=IrErrorType origin=LAMBDA
@@ -0,0 +1,85 @@
FILE fqName:<root> fileName:/nonLocalReturn.kt
FUN name:test0 visibility:public modality:FINAL <> () returnType:kotlin.Unit
BLOCK_BODY
ERROR_CALL 'Unresolved reference: <Ambiguity: run, [kotlin/run, kotlin/run]>#' type=IrErrorType
BLOCK type=IrErrorType origin=LAMBDA
FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> () returnType:IrErrorType
BLOCK_BODY
RETURN type=kotlin.Nothing from='local final fun <anonymous> (): IrErrorType declared in <root>.test0'
RETURN type=kotlin.Nothing from='local final fun <anonymous> (): IrErrorType declared in <root>.test0'
GET_OBJECT 'CLASS IR_EXTERNAL_DECLARATION_STUB OBJECT name:Unit modality:FINAL visibility:public superTypes:[kotlin.Any]' type=kotlin.Unit
FUNCTION_REFERENCE 'local final fun <anonymous> (): IrErrorType declared in <root>.test0' type=IrErrorType origin=LAMBDA
FUN name:test1 visibility:public modality:FINAL <> () returnType:kotlin.Unit
BLOCK_BODY
ERROR_CALL 'Unresolved reference: <Ambiguity: run, [kotlin/run, kotlin/run]>#' type=IrErrorType
BLOCK type=IrErrorType origin=LAMBDA
FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> () returnType:IrErrorType
BLOCK_BODY
RETURN type=kotlin.Nothing from='local final fun <anonymous> (): IrErrorType declared in <root>.test1'
RETURN type=kotlin.Nothing from='local final fun <anonymous> (): IrErrorType declared in <root>.test1'
GET_OBJECT 'CLASS IR_EXTERNAL_DECLARATION_STUB OBJECT name:Unit modality:FINAL visibility:public superTypes:[kotlin.Any]' type=kotlin.Unit
FUNCTION_REFERENCE 'local final fun <anonymous> (): IrErrorType declared in <root>.test1' type=IrErrorType origin=LAMBDA
FUN name:test2 visibility:public modality:FINAL <> () returnType:kotlin.Unit
BLOCK_BODY
ERROR_CALL 'Unresolved reference: <Ambiguity: run, [kotlin/run, kotlin/run]>#' type=IrErrorType
BLOCK type=IrErrorType origin=LAMBDA
FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> () returnType:IrErrorType
BLOCK_BODY
RETURN type=kotlin.Nothing from='local final fun <anonymous> (): IrErrorType declared in <root>.test2'
RETURN type=kotlin.Nothing from='local final fun <anonymous> (): IrErrorType declared in <root>.test2'
GET_OBJECT 'CLASS IR_EXTERNAL_DECLARATION_STUB OBJECT name:Unit modality:FINAL visibility:public superTypes:[kotlin.Any]' type=kotlin.Unit
FUNCTION_REFERENCE 'local final fun <anonymous> (): IrErrorType declared in <root>.test2' type=IrErrorType origin=LAMBDA
FUN name:test3 visibility:public modality:FINAL <> () returnType:kotlin.Unit
BLOCK_BODY
ERROR_CALL 'Unresolved reference: <Ambiguity: run, [kotlin/run, kotlin/run]>#' type=IrErrorType
BLOCK type=IrErrorType origin=LAMBDA
FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> () returnType:IrErrorType
BLOCK_BODY
RETURN type=kotlin.Nothing from='local final fun <anonymous> (): IrErrorType declared in <root>.test3'
ERROR_CALL 'Unresolved reference: <Ambiguity: run, [kotlin/run, kotlin/run]>#' type=IrErrorType
BLOCK type=IrErrorType origin=LAMBDA
FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> () returnType:IrErrorType
BLOCK_BODY
RETURN type=kotlin.Nothing from='local final fun <anonymous> (): IrErrorType declared in <root>.test3.<anonymous>'
RETURN type=kotlin.Nothing from='local final fun <anonymous> (): IrErrorType declared in <root>.test3.<anonymous>'
GET_OBJECT 'CLASS IR_EXTERNAL_DECLARATION_STUB OBJECT name:Unit modality:FINAL visibility:public superTypes:[kotlin.Any]' type=kotlin.Unit
FUNCTION_REFERENCE 'local final fun <anonymous> (): IrErrorType declared in <root>.test3.<anonymous>' type=IrErrorType origin=LAMBDA
FUNCTION_REFERENCE 'local final fun <anonymous> (): IrErrorType declared in <root>.test3' type=IrErrorType origin=LAMBDA
FUN name:testLrmFoo1 visibility:public modality:FINAL <> (ints:kotlin.collections.List<kotlin.Int>) returnType:kotlin.Unit
VALUE_PARAMETER name:ints index:0 type:kotlin.collections.List<kotlin.Int>
BLOCK_BODY
ERROR_CALL 'Unresolved reference: <Ambiguity: forEach, [kotlin/collections/forEach, kotlin/collections/forEach, kotlin/collections/forEach, kotlin/collections/forEach, kotlin/collections/forEach, kotlin/collections/forEach, kotlin/collections/forEach, kotlin/collections/forEach, kotlin/collections/forEach, kotlin/collections/forEach, kotlin/collections/forEach, kotlin/collections/forEach, kotlin/collections/forEach, kotlin/collections/forEach, kotlin/collections/forEach, kotlin/collections/forEach, kotlin/sequences/forEach, kotlin/text/forEach]>#' type=IrErrorType
BLOCK type=IrErrorType origin=LAMBDA
FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> () returnType:IrErrorType
BLOCK_BODY
RETURN type=kotlin.Nothing from='local final fun <anonymous> (): IrErrorType declared in <root>.testLrmFoo1'
BLOCK type=IrErrorType origin=null
WHEN type=IrErrorType origin=IF
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: ERROR_CALL 'Unresolved reference: <Unresolved name: it>#' type=IrErrorType
arg1: CONST Int type=kotlin.Int value=0
then: RETURN type=kotlin.Nothing from='local final fun <anonymous> (): IrErrorType declared in <root>.testLrmFoo1'
GET_OBJECT 'CLASS IR_EXTERNAL_DECLARATION_STUB OBJECT name:Unit modality:FINAL visibility:public superTypes:[kotlin.Any]' type=kotlin.Unit
ERROR_CALL 'Unresolved reference: <Ambiguity: print, [kotlin/io/print, kotlin/io/print, kotlin/io/print, kotlin/io/print, kotlin/io/print, kotlin/io/print, kotlin/io/print, kotlin/io/print, kotlin/io/print, kotlin/io/print]>#' type=IrErrorType
ERROR_CALL 'Unresolved reference: <Unresolved name: it>#' type=IrErrorType
FUNCTION_REFERENCE 'local final fun <anonymous> (): IrErrorType declared in <root>.testLrmFoo1' type=IrErrorType origin=LAMBDA
FUN name:testLrmFoo2 visibility:public modality:FINAL <> (ints:kotlin.collections.List<kotlin.Int>) returnType:kotlin.Unit
VALUE_PARAMETER name:ints index:0 type:kotlin.collections.List<kotlin.Int>
BLOCK_BODY
ERROR_CALL 'Unresolved reference: <Ambiguity: forEach, [kotlin/collections/forEach, kotlin/collections/forEach, kotlin/collections/forEach, kotlin/collections/forEach, kotlin/collections/forEach, kotlin/collections/forEach, kotlin/collections/forEach, kotlin/collections/forEach, kotlin/collections/forEach, kotlin/collections/forEach, kotlin/collections/forEach, kotlin/collections/forEach, kotlin/collections/forEach, kotlin/collections/forEach, kotlin/collections/forEach, kotlin/collections/forEach, kotlin/sequences/forEach, kotlin/text/forEach]>#' type=IrErrorType
BLOCK type=IrErrorType origin=LAMBDA
FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> () returnType:IrErrorType
BLOCK_BODY
RETURN type=kotlin.Nothing from='local final fun <anonymous> (): IrErrorType declared in <root>.testLrmFoo2'
BLOCK type=IrErrorType origin=null
WHEN type=IrErrorType origin=IF
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: ERROR_CALL 'Unresolved reference: <Unresolved name: it>#' type=IrErrorType
arg1: CONST Int type=kotlin.Int value=0
then: RETURN type=kotlin.Nothing from='local final fun <anonymous> (): IrErrorType declared in <root>.testLrmFoo2'
GET_OBJECT 'CLASS IR_EXTERNAL_DECLARATION_STUB OBJECT name:Unit modality:FINAL visibility:public superTypes:[kotlin.Any]' type=kotlin.Unit
ERROR_CALL 'Unresolved reference: <Ambiguity: print, [kotlin/io/print, kotlin/io/print, kotlin/io/print, kotlin/io/print, kotlin/io/print, kotlin/io/print, kotlin/io/print, kotlin/io/print, kotlin/io/print, kotlin/io/print]>#' type=IrErrorType
ERROR_CALL 'Unresolved reference: <Unresolved name: it>#' type=IrErrorType
FUNCTION_REFERENCE 'local final fun <anonymous> (): IrErrorType declared in <root>.testLrmFoo2' type=IrErrorType origin=LAMBDA
+13
View File
@@ -0,0 +1,13 @@
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
BLOCK type=IrErrorType origin=LAMBDA
FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> () returnType:IrErrorType
BLOCK_BODY
RETURN type=kotlin.Nothing from='local final fun <anonymous> (): IrErrorType declared in <root>.test1'
ERROR_CALL 'Unresolved reference: <Ambiguity: println, [kotlin/io/println, kotlin/io/println, kotlin/io/println, kotlin/io/println, kotlin/io/println, kotlin/io/println, kotlin/io/println, kotlin/io/println, kotlin/io/println, kotlin/io/println]>#' type=IrErrorType
CONST String type=kotlin.String value="Hello, world!"
FUNCTION_REFERENCE 'local final fun <anonymous> (): IrErrorType declared in <root>.test1' type=IrErrorType origin=LAMBDA
ERROR_CALL 'Unresolved reference: <Ambiguity: run, [kotlin/run, kotlin/run]>#' type=IrErrorType