[FIR] add vararg arguments support, improve vararg parameters support

This commit is contained in:
Juan Chen
2020-01-27 19:51:35 -08:00
committed by Mikhail Glukhikh
parent 069fbffaa3
commit 188abc243a
75 changed files with 339 additions and 207 deletions
@@ -88,11 +88,11 @@ FILE fqName:<root> fileName:/annotationClasses.kt
CLASS ANNOTATION_CLASS name:Test4 modality:FINAL visibility:public superTypes:[kotlin.Annotation]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.Test4
CONSTRUCTOR visibility:public <> (xs:kotlin.IntArray) returnType:<root>.Test4 [primary]
VALUE_PARAMETER name:xs index:0 type:kotlin.IntArray
VALUE_PARAMETER name:xs index:0 type:kotlin.IntArray varargElementType:kotlin.Int [vararg]
PROPERTY name:xs visibility:public modality:FINAL [val]
FIELD PROPERTY_BACKING_FIELD name:xs type:kotlin.Array<out kotlin.Int> visibility:private [final]
EXPRESSION_BODY
GET_VAR 'xs: kotlin.IntArray declared in <root>.Test4.<init>' type=kotlin.IntArray origin=INITIALIZE_PROPERTY_FROM_PARAMETER
GET_VAR 'xs: kotlin.IntArray [vararg] declared in <root>.Test4.<init>' type=kotlin.IntArray origin=INITIALIZE_PROPERTY_FROM_PARAMETER
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-xs> visibility:public modality:FINAL <> ($this:<root>.Test4) returnType:kotlin.Array<out kotlin.Int>
correspondingProperty: PROPERTY name:xs visibility:public modality:FINAL [val]
$this: VALUE_PARAMETER name:<this> type:<root>.Test4
@@ -2,11 +2,11 @@ FILE fqName:<root> fileName:/annotationsWithVarargParameters.kt
CLASS ANNOTATION_CLASS name:A modality:FINAL visibility:public superTypes:[kotlin.Annotation]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.A
CONSTRUCTOR visibility:public <> (xs:kotlin.Array<kotlin.String>) returnType:<root>.A [primary]
VALUE_PARAMETER name:xs index:0 type:kotlin.Array<kotlin.String>
VALUE_PARAMETER name:xs index:0 type:kotlin.Array<kotlin.String> varargElementType:kotlin.String [vararg]
PROPERTY name:xs visibility:public modality:FINAL [val]
FIELD PROPERTY_BACKING_FIELD name:xs type:kotlin.Array<out kotlin.String> visibility:private [final]
EXPRESSION_BODY
GET_VAR 'xs: kotlin.Array<kotlin.String> declared in <root>.A.<init>' type=kotlin.Array<kotlin.String> origin=INITIALIZE_PROPERTY_FROM_PARAMETER
GET_VAR 'xs: kotlin.Array<kotlin.String> [vararg] declared in <root>.A.<init>' type=kotlin.Array<kotlin.String> origin=INITIALIZE_PROPERTY_FROM_PARAMETER
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-xs> visibility:public modality:FINAL <> ($this:<root>.A) returnType:kotlin.Array<out kotlin.String>
correspondingProperty: PROPERTY name:xs visibility:public modality:FINAL [val]
$this: VALUE_PARAMETER name:<this> type:<root>.A
@@ -2,11 +2,11 @@ FILE fqName:<root> fileName:/spreadOperatorInAnnotationArguments.kt
CLASS ANNOTATION_CLASS name:A modality:FINAL visibility:public superTypes:[kotlin.Annotation]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.A
CONSTRUCTOR visibility:public <> (xs:kotlin.Array<kotlin.String>) returnType:<root>.A [primary]
VALUE_PARAMETER name:xs index:0 type:kotlin.Array<kotlin.String>
VALUE_PARAMETER name:xs index:0 type:kotlin.Array<kotlin.String> varargElementType:kotlin.String [vararg]
PROPERTY name:xs visibility:public modality:FINAL [val]
FIELD PROPERTY_BACKING_FIELD name:xs type:kotlin.Array<out kotlin.String> visibility:private [final]
EXPRESSION_BODY
GET_VAR 'xs: kotlin.Array<kotlin.String> declared in <root>.A.<init>' type=kotlin.Array<kotlin.String> origin=INITIALIZE_PROPERTY_FROM_PARAMETER
GET_VAR 'xs: kotlin.Array<kotlin.String> [vararg] declared in <root>.A.<init>' type=kotlin.Array<kotlin.String> origin=INITIALIZE_PROPERTY_FROM_PARAMETER
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-xs> visibility:public modality:FINAL <> ($this:<root>.A) returnType:kotlin.Array<out kotlin.String>
correspondingProperty: PROPERTY name:xs visibility:public modality:FINAL [val]
$this: VALUE_PARAMETER name:<this> type:<root>.A
@@ -2,11 +2,11 @@ FILE fqName:<root> fileName:/varargsInAnnotationArguments.kt
CLASS ANNOTATION_CLASS name:A1 modality:FINAL visibility:public superTypes:[kotlin.Annotation]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.A1
CONSTRUCTOR visibility:public <> (xs:kotlin.IntArray) returnType:<root>.A1 [primary]
VALUE_PARAMETER name:xs index:0 type:kotlin.IntArray
VALUE_PARAMETER name:xs index:0 type:kotlin.IntArray varargElementType:kotlin.Int [vararg]
PROPERTY name:xs visibility:public modality:FINAL [val]
FIELD PROPERTY_BACKING_FIELD name:xs type:kotlin.Array<out kotlin.Int> visibility:private [final]
EXPRESSION_BODY
GET_VAR 'xs: kotlin.IntArray declared in <root>.A1.<init>' type=kotlin.IntArray origin=INITIALIZE_PROPERTY_FROM_PARAMETER
GET_VAR 'xs: kotlin.IntArray [vararg] declared in <root>.A1.<init>' type=kotlin.IntArray origin=INITIALIZE_PROPERTY_FROM_PARAMETER
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-xs> visibility:public modality:FINAL <> ($this:<root>.A1) returnType:kotlin.Array<out kotlin.Int>
correspondingProperty: PROPERTY name:xs visibility:public modality:FINAL [val]
$this: VALUE_PARAMETER name:<this> type:<root>.A1
@@ -30,11 +30,11 @@ FILE fqName:<root> fileName:/varargsInAnnotationArguments.kt
CLASS ANNOTATION_CLASS name:A2 modality:FINAL visibility:public superTypes:[kotlin.Annotation]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.A2
CONSTRUCTOR visibility:public <> (xs:kotlin.Array<kotlin.String>) returnType:<root>.A2 [primary]
VALUE_PARAMETER name:xs index:0 type:kotlin.Array<kotlin.String>
VALUE_PARAMETER name:xs index:0 type:kotlin.Array<kotlin.String> varargElementType:kotlin.String [vararg]
PROPERTY name:xs visibility:public modality:FINAL [val]
FIELD PROPERTY_BACKING_FIELD name:xs type:kotlin.Array<out kotlin.String> visibility:private [final]
EXPRESSION_BODY
GET_VAR 'xs: kotlin.Array<kotlin.String> declared in <root>.A2.<init>' type=kotlin.Array<kotlin.String> origin=INITIALIZE_PROPERTY_FROM_PARAMETER
GET_VAR 'xs: kotlin.Array<kotlin.String> [vararg] declared in <root>.A2.<init>' type=kotlin.Array<kotlin.String> origin=INITIALIZE_PROPERTY_FROM_PARAMETER
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-xs> visibility:public modality:FINAL <> ($this:<root>.A2) returnType:kotlin.Array<out kotlin.String>
correspondingProperty: PROPERTY name:xs visibility:public modality:FINAL [val]
$this: VALUE_PARAMETER name:<this> type:<root>.A2
@@ -58,11 +58,11 @@ FILE fqName:<root> fileName:/varargsInAnnotationArguments.kt
CLASS ANNOTATION_CLASS name:AA modality:FINAL visibility:public superTypes:[kotlin.Annotation]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.AA
CONSTRUCTOR visibility:public <> (xs:kotlin.Array<<root>.A1>) returnType:<root>.AA [primary]
VALUE_PARAMETER name:xs index:0 type:kotlin.Array<<root>.A1>
VALUE_PARAMETER name:xs index:0 type:kotlin.Array<<root>.A1> varargElementType:<root>.A1 [vararg]
PROPERTY name:xs visibility:public modality:FINAL [val]
FIELD PROPERTY_BACKING_FIELD name:xs type:kotlin.Array<out <root>.A1> visibility:private [final]
EXPRESSION_BODY
GET_VAR 'xs: kotlin.Array<<root>.A1> declared in <root>.AA.<init>' type=kotlin.Array<<root>.A1> origin=INITIALIZE_PROPERTY_FROM_PARAMETER
GET_VAR 'xs: kotlin.Array<<root>.A1> [vararg] declared in <root>.AA.<init>' type=kotlin.Array<<root>.A1> origin=INITIALIZE_PROPERTY_FROM_PARAMETER
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-xs> visibility:public modality:FINAL <> ($this:<root>.AA) returnType:kotlin.Array<out <root>.A1>
correspondingProperty: PROPERTY name:xs visibility:public modality:FINAL [val]
$this: VALUE_PARAMETER name:<this> type:<root>.AA
@@ -13,7 +13,7 @@ FILE fqName:<root> fileName:/fun.kt
CONST String type=kotlin.String value=""
BLOCK_BODY
FUN name:test3 visibility:public modality:FINAL <> (args:kotlin.Array<kotlin.String>) returnType:kotlin.Unit
VALUE_PARAMETER name:args index:0 type:kotlin.Array<kotlin.String>
VALUE_PARAMETER name:args index:0 type:kotlin.Array<kotlin.String> varargElementType:kotlin.String [vararg]
BLOCK_BODY
FUN name:textExt1 visibility:public modality:FINAL <> ($receiver:kotlin.String, i:kotlin.Int, j:kotlin.String) returnType:kotlin.Unit
$receiver: VALUE_PARAMETER name:<this> type:kotlin.String
@@ -16,7 +16,7 @@ FILE fqName:<root> fileName:/localFun.kt
CONST String type=kotlin.String value=""
BLOCK_BODY
FUN name:test3 visibility:local modality:FINAL <> (args:kotlin.Array<kotlin.String>) returnType:kotlin.Unit
VALUE_PARAMETER name:args index:0 type:kotlin.Array<kotlin.String>
VALUE_PARAMETER name:args index:0 type:kotlin.Array<kotlin.String> varargElementType:kotlin.String [vararg]
BLOCK_BODY
FUN name:textExt1 visibility:local modality:FINAL <> ($receiver:kotlin.String, i:kotlin.Int, j:TT of <root>.outer) returnType:kotlin.Unit
$receiver: VALUE_PARAMETER name:<this> type:kotlin.String
@@ -2,10 +2,11 @@ FILE fqName:<root> fileName:/arrayAssignment.kt
FUN name:test visibility:public modality:FINAL <> () returnType:kotlin.Unit
BLOCK_BODY
VAR name:x type:kotlin.IntArray [val]
ERROR_CALL 'Cannot bind 3 arguments to intArrayOf call with 1 parameters' type=kotlin.IntArray
CONST Int type=kotlin.Int value=1
CONST Int type=kotlin.Int value=2
CONST Int type=kotlin.Int value=3
CALL 'public final fun intArrayOf (vararg elements: kotlin.Int): kotlin.IntArray declared in kotlin' type=kotlin.IntArray origin=null
elements: VARARG type=kotlin.IntArray varargElementType=kotlin.Int
CONST Int type=kotlin.Int value=1
CONST Int type=kotlin.Int value=2
CONST Int type=kotlin.Int value=3
CALL 'public final fun set (index: kotlin.Int, value: kotlin.Int): kotlin.Unit [operator] declared in kotlin.IntArray' type=kotlin.Unit origin=null
$this: GET_VAR 'val x: kotlin.IntArray [val] declared in <root>.test' type=kotlin.IntArray origin=null
index: CONST Int type=kotlin.Int value=1
@@ -17,9 +18,10 @@ FILE fqName:<root> fileName:/arrayAssignment.kt
FUN name:test2 visibility:public modality:FINAL <> () returnType:kotlin.Unit
BLOCK_BODY
CALL 'public final fun set (index: kotlin.Int, value: kotlin.Int): kotlin.Unit [operator] declared in kotlin.IntArray' type=kotlin.Unit origin=null
$this: ERROR_CALL 'Cannot bind 3 arguments to intArrayOf call with 1 parameters' type=kotlin.IntArray
CONST Int type=kotlin.Int value=1
CONST Int type=kotlin.Int value=2
CONST Int type=kotlin.Int value=3
$this: CALL 'public final fun intArrayOf (vararg elements: kotlin.Int): kotlin.IntArray declared in kotlin' type=kotlin.IntArray origin=null
elements: VARARG type=kotlin.IntArray varargElementType=kotlin.Int
CONST Int type=kotlin.Int value=1
CONST Int type=kotlin.Int value=2
CONST Int type=kotlin.Int value=3
index: CALL 'public final fun foo (): kotlin.Int declared in <root>' type=kotlin.Int origin=null
value: CONST Int type=kotlin.Int value=1
@@ -2,10 +2,11 @@ FILE fqName:<root> fileName:/arrayAugmentedAssignment1.kt
FUN name:foo visibility:public modality:FINAL <> () returnType:kotlin.IntArray
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun foo (): kotlin.IntArray declared in <root>'
ERROR_CALL 'Cannot bind 3 arguments to intArrayOf call with 1 parameters' type=kotlin.IntArray
CONST Int type=kotlin.Int value=1
CONST Int type=kotlin.Int value=2
CONST Int type=kotlin.Int value=3
CALL 'public final fun intArrayOf (vararg elements: kotlin.Int): kotlin.IntArray declared in kotlin' type=kotlin.IntArray origin=null
elements: VARARG type=kotlin.IntArray varargElementType=kotlin.Int
CONST Int type=kotlin.Int value=1
CONST Int type=kotlin.Int value=2
CONST Int type=kotlin.Int value=3
FUN name:bar visibility:public modality:FINAL <> () returnType:kotlin.Int
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun bar (): kotlin.Int declared in <root>'
@@ -98,9 +98,9 @@ FILE fqName:<root> fileName:/caoWithAdaptationForSam.kt
VALUE_PARAMETER name:newValue index:1 type:kotlin.Int
BLOCK_BODY
FUN name:withVararg visibility:public modality:FINAL <> (xs:kotlin.IntArray) returnType:kotlin.Int
VALUE_PARAMETER name:xs index:0 type:kotlin.IntArray
VALUE_PARAMETER name:xs index:0 type:kotlin.IntArray varargElementType:kotlin.Int [vararg]
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun withVararg (xs: kotlin.IntArray): kotlin.Int declared in <root>'
RETURN type=kotlin.Nothing from='public final fun withVararg (vararg xs: kotlin.Int): kotlin.Int declared in <root>'
CONST Int type=kotlin.Int value=42
FUN name:test1 visibility:public modality:FINAL <> () returnType:kotlin.Unit
BLOCK_BODY
@@ -9,7 +9,7 @@ FILE fqName:<root> fileName:/constructorWithAdaptedArguments.kt
CLASS CLASS name:C modality:FINAL visibility:public superTypes:[kotlin.Any]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.C
CONSTRUCTOR visibility:public <> (xs:kotlin.IntArray) returnType:<root>.C [primary]
VALUE_PARAMETER name:xs index:0 type:kotlin.IntArray
VALUE_PARAMETER name:xs index:0 type:kotlin.IntArray varargElementType:kotlin.Int [vararg]
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:C modality:FINAL visibility:public superTypes:[kotlin.Any]'
@@ -35,7 +35,7 @@ FILE fqName:<root> fileName:/constructorWithAdaptedArguments.kt
CLASS CLASS name:Inner modality:FINAL visibility:public [inner] superTypes:[kotlin.Any]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.Outer.Inner
CONSTRUCTOR visibility:public <> (xs:kotlin.IntArray) returnType:<root>.Outer.Inner [primary]
VALUE_PARAMETER name:xs index:0 type:kotlin.IntArray
VALUE_PARAMETER name:xs index:0 type:kotlin.IntArray varargElementType:kotlin.Int [vararg]
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Inner modality:FINAL visibility:public [inner] superTypes:[kotlin.Any]'
@@ -69,15 +69,15 @@ FILE fqName:<root> fileName:/constructorWithAdaptedArguments.kt
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun testConstructor (): IrErrorType declared in <root>'
ERROR_CALL 'Unresolved reference: <Inapplicable(INAPPLICABLE): [/use]>#' type=IrErrorType
FUNCTION_REFERENCE 'public constructor <init> (xs: kotlin.IntArray) [primary] declared in <root>.C' type=kotlin.reflect.KFunction1<kotlin.IntArray, <root>.C> origin=null reflectionTarget=<same>
FUNCTION_REFERENCE 'public constructor <init> (vararg xs: kotlin.Int) [primary] declared in <root>.C' type=kotlin.reflect.KFunction1<kotlin.IntArray, <root>.C> origin=null reflectionTarget=<same>
FUN name:testInnerClassConstructor visibility:public modality:FINAL <> (outer:<root>.Outer) returnType:IrErrorType
VALUE_PARAMETER name:outer index:0 type:<root>.Outer
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun testInnerClassConstructor (outer: <root>.Outer): IrErrorType declared in <root>'
ERROR_CALL 'Unresolved reference: <Inapplicable(INAPPLICABLE): [/use]>#' type=IrErrorType
FUNCTION_REFERENCE 'public constructor <init> (xs: kotlin.IntArray) [primary] declared in <root>.Outer.Inner' type=kotlin.reflect.KFunction1<kotlin.IntArray, <root>.Outer.Inner> origin=null reflectionTarget=<same>
FUNCTION_REFERENCE 'public constructor <init> (vararg xs: kotlin.Int) [primary] declared in <root>.Outer.Inner' type=kotlin.reflect.KFunction1<kotlin.IntArray, <root>.Outer.Inner> origin=null reflectionTarget=<same>
FUN name:testInnerClassConstructorCapturingOuter visibility:public modality:FINAL <> () returnType:IrErrorType
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun testInnerClassConstructorCapturingOuter (): IrErrorType declared in <root>'
ERROR_CALL 'Unresolved reference: <Inapplicable(INAPPLICABLE): [/use]>#' type=IrErrorType
FUNCTION_REFERENCE 'public constructor <init> (xs: kotlin.IntArray) [primary] declared in <root>.Outer.Inner' type=kotlin.reflect.KFunction1<kotlin.IntArray, <root>.Outer.Inner> origin=null reflectionTarget=<same>
FUNCTION_REFERENCE 'public constructor <init> (vararg xs: kotlin.Int) [primary] declared in <root>.Outer.Inner' type=kotlin.reflect.KFunction1<kotlin.IntArray, <root>.Outer.Inner> origin=null reflectionTarget=<same>
@@ -13,9 +13,9 @@ FILE fqName:<root> fileName:/unboundMemberReferenceWithAdaptedArguments.kt
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:A modality:OPEN visibility:public superTypes:[kotlin.Any]'
FUN name:foo visibility:public modality:OPEN <> ($this:<root>.A, xs:kotlin.IntArray) returnType:kotlin.Int
$this: VALUE_PARAMETER name:<this> type:<root>.A
VALUE_PARAMETER name:xs index:0 type:kotlin.IntArray
VALUE_PARAMETER name:xs index:0 type:kotlin.IntArray varargElementType:kotlin.Int [vararg]
BLOCK_BODY
RETURN type=kotlin.Nothing from='public open fun foo (xs: kotlin.IntArray): kotlin.Int declared in <root>.A'
RETURN type=kotlin.Nothing from='public open fun foo (vararg xs: kotlin.Int): kotlin.Int declared in <root>.A'
CONST Int type=kotlin.Int value=1
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator]
overridden:
@@ -38,9 +38,9 @@ FILE fqName:<root> fileName:/unboundMemberReferenceWithAdaptedArguments.kt
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS OBJECT name:Obj modality:FINAL visibility:public superTypes:[<root>.A]'
FUN name:foo visibility:public modality:FINAL <> ($this:<root>.Obj, xs:kotlin.IntArray) returnType:kotlin.Int
$this: VALUE_PARAMETER name:<this> type:<root>.Obj
VALUE_PARAMETER name:xs index:0 type:kotlin.IntArray
VALUE_PARAMETER name:xs index:0 type:kotlin.IntArray varargElementType:kotlin.Int [vararg]
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun foo (xs: kotlin.IntArray): kotlin.Int declared in <root>.Obj'
RETURN type=kotlin.Nothing from='public final fun foo (vararg xs: kotlin.Int): kotlin.Int declared in <root>.Obj'
CONST Int type=kotlin.Int value=1
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator]
overridden:
@@ -58,13 +58,13 @@ FILE fqName:<root> fileName:/unboundMemberReferenceWithAdaptedArguments.kt
FUN name:testUnbound visibility:public modality:FINAL <> () returnType:kotlin.Unit
BLOCK_BODY
ERROR_CALL 'Unresolved reference: <Inapplicable(INAPPLICABLE): [/use1]>#' type=IrErrorType
FUNCTION_REFERENCE 'public open fun foo (xs: kotlin.IntArray): kotlin.Int declared in <root>.A' type=kotlin.reflect.KFunction2<<root>.A, kotlin.IntArray, kotlin.Int> origin=null reflectionTarget=<same>
FUNCTION_REFERENCE 'public open fun foo (vararg xs: kotlin.Int): kotlin.Int declared in <root>.A' type=kotlin.reflect.KFunction2<<root>.A, kotlin.IntArray, kotlin.Int> origin=null reflectionTarget=<same>
FUN name:testBound visibility:public modality:FINAL <> (a:<root>.A) returnType:kotlin.Unit
VALUE_PARAMETER name:a index:0 type:<root>.A
BLOCK_BODY
ERROR_CALL 'Unresolved reference: <Inapplicable(INAPPLICABLE): [/use2]>#' type=IrErrorType
FUNCTION_REFERENCE 'public open fun foo (xs: kotlin.IntArray): kotlin.Int declared in <root>.A' type=kotlin.reflect.KFunction1<kotlin.IntArray, kotlin.Int> origin=null reflectionTarget=<same>
FUNCTION_REFERENCE 'public open fun foo (vararg xs: kotlin.Int): kotlin.Int declared in <root>.A' type=kotlin.reflect.KFunction1<kotlin.IntArray, kotlin.Int> origin=null reflectionTarget=<same>
FUN name:testObject visibility:public modality:FINAL <> () returnType:kotlin.Unit
BLOCK_BODY
ERROR_CALL 'Unresolved reference: <Inapplicable(INAPPLICABLE): [/use2]>#' type=IrErrorType
FUNCTION_REFERENCE 'public final fun foo (xs: kotlin.IntArray): kotlin.Int declared in <root>.Obj' type=kotlin.reflect.KFunction1<kotlin.IntArray, kotlin.Int> origin=null reflectionTarget=<same>
FUNCTION_REFERENCE 'public final fun foo (vararg xs: kotlin.Int): kotlin.Int declared in <root>.Obj' type=kotlin.reflect.KFunction1<kotlin.IntArray, kotlin.Int> origin=null reflectionTarget=<same>
@@ -21,11 +21,11 @@ FILE fqName:<root> fileName:/withAdaptationForSam.kt
VALUE_PARAMETER name:foo index:0 type:<root>.IFoo
BLOCK_BODY
FUN name:withVararg visibility:public modality:FINAL <> (xs:kotlin.IntArray) returnType:kotlin.Int
VALUE_PARAMETER name:xs index:0 type:kotlin.IntArray
VALUE_PARAMETER name:xs index:0 type:kotlin.IntArray varargElementType:kotlin.Int [vararg]
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun withVararg (xs: kotlin.IntArray): kotlin.Int declared in <root>'
RETURN type=kotlin.Nothing from='public final fun withVararg (vararg xs: kotlin.Int): kotlin.Int declared in <root>'
CONST Int type=kotlin.Int value=42
FUN name:test visibility:public modality:FINAL <> () returnType:kotlin.Unit
BLOCK_BODY
ERROR_CALL 'Unresolved reference: <Inapplicable(INAPPLICABLE): [/useFoo]>#' type=IrErrorType
FUNCTION_REFERENCE 'public final fun withVararg (xs: kotlin.IntArray): kotlin.Int declared in <root>' type=kotlin.reflect.KFunction1<kotlin.IntArray, kotlin.Int> origin=null reflectionTarget=<same>
FUNCTION_REFERENCE 'public final fun withVararg (vararg xs: kotlin.Int): kotlin.Int declared in <root>' type=kotlin.reflect.KFunction1<kotlin.IntArray, kotlin.Int> origin=null reflectionTarget=<same>
@@ -18,9 +18,9 @@ FILE fqName:<root> fileName:/withAdaptedArguments.kt
RETURN type=kotlin.Nothing from='public final fun fnWithDefault (a: kotlin.Int, b: kotlin.Int): kotlin.String declared in <root>'
CONST String type=kotlin.String value="abc"
FUN name:fnWithVarargs visibility:public modality:FINAL <> (xs:kotlin.IntArray) returnType:kotlin.String
VALUE_PARAMETER name:xs index:0 type:kotlin.IntArray
VALUE_PARAMETER name:xs index:0 type:kotlin.IntArray varargElementType:kotlin.Int [vararg]
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun fnWithVarargs (xs: kotlin.IntArray): kotlin.String declared in <root>'
RETURN type=kotlin.Nothing from='public final fun fnWithVarargs (vararg xs: kotlin.Int): kotlin.String declared in <root>'
CONST String type=kotlin.String value="abc"
CLASS OBJECT name:Host modality:FINAL visibility:public superTypes:[kotlin.Any]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.Host
@@ -30,9 +30,9 @@ FILE fqName:<root> fileName:/withAdaptedArguments.kt
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS OBJECT name:Host modality:FINAL visibility:public superTypes:[kotlin.Any]'
FUN name:importedObjectMemberWithVarargs visibility:public modality:FINAL <> ($this:<root>.Host, xs:kotlin.IntArray) returnType:kotlin.String
$this: VALUE_PARAMETER name:<this> type:<root>.Host
VALUE_PARAMETER name:xs index:0 type:kotlin.IntArray
VALUE_PARAMETER name:xs index:0 type:kotlin.IntArray varargElementType:kotlin.Int [vararg]
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun importedObjectMemberWithVarargs (xs: kotlin.IntArray): kotlin.String declared in <root>.Host'
RETURN type=kotlin.Nothing from='public final fun importedObjectMemberWithVarargs (vararg xs: kotlin.Int): kotlin.String declared in <root>.Host'
CONST String type=kotlin.String value="abc"
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator]
overridden:
@@ -56,7 +56,7 @@ FILE fqName:<root> fileName:/withAdaptedArguments.kt
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun testVararg (): IrErrorType declared in <root>'
ERROR_CALL 'Unresolved reference: <Inapplicable(INAPPLICABLE): [/use]>#' type=IrErrorType
FUNCTION_REFERENCE 'public final fun fnWithVarargs (xs: kotlin.IntArray): kotlin.String declared in <root>' type=kotlin.reflect.KFunction1<kotlin.IntArray, kotlin.String> origin=null reflectionTarget=<same>
FUNCTION_REFERENCE 'public final fun fnWithVarargs (vararg xs: kotlin.Int): kotlin.String declared in <root>' type=kotlin.reflect.KFunction1<kotlin.IntArray, kotlin.String> origin=null reflectionTarget=<same>
FUN name:testCoercionToUnit visibility:public modality:FINAL <> () returnType:IrErrorType
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun testCoercionToUnit (): IrErrorType declared in <root>'
@@ -66,4 +66,4 @@ FILE fqName:<root> fileName:/withAdaptedArguments.kt
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun testImportedObjectMember (): IrErrorType declared in <root>'
ERROR_CALL 'Unresolved reference: <Inapplicable(INAPPLICABLE): [/use]>#' type=IrErrorType
FUNCTION_REFERENCE 'public final fun importedObjectMemberWithVarargs (xs: kotlin.IntArray): kotlin.String declared in <root>.Host' type=kotlin.reflect.KFunction1<kotlin.IntArray, kotlin.String> origin=null reflectionTarget=<same>
FUNCTION_REFERENCE 'public final fun importedObjectMemberWithVarargs (vararg xs: kotlin.Int): kotlin.String declared in <root>.Host' type=kotlin.reflect.KFunction1<kotlin.IntArray, kotlin.String> origin=null reflectionTarget=<same>
@@ -13,40 +13,40 @@ FILE fqName:<root> fileName:/withArgumentAdaptationAndReceiver.kt
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Host modality:FINAL visibility:public superTypes:[kotlin.Any]'
FUN name:withVararg visibility:public modality:FINAL <> ($this:<root>.Host, xs:kotlin.IntArray) returnType:kotlin.String
$this: VALUE_PARAMETER name:<this> type:<root>.Host
VALUE_PARAMETER name:xs index:0 type:kotlin.IntArray
VALUE_PARAMETER name:xs index:0 type:kotlin.IntArray varargElementType:kotlin.Int [vararg]
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun withVararg (xs: kotlin.IntArray): kotlin.String declared in <root>.Host'
RETURN type=kotlin.Nothing from='public final fun withVararg (vararg xs: kotlin.Int): kotlin.String declared in <root>.Host'
CONST String type=kotlin.String value=""
FUN name:testImplicitThis visibility:public modality:FINAL <> ($this:<root>.Host) returnType:kotlin.Unit
$this: VALUE_PARAMETER name:<this> type:<root>.Host
BLOCK_BODY
ERROR_CALL 'Unresolved reference: <Inapplicable(INAPPLICABLE): [/use]>#' type=IrErrorType
FUNCTION_REFERENCE 'public final fun withVararg (xs: kotlin.IntArray): kotlin.String declared in <root>.Host' type=kotlin.reflect.KFunction1<kotlin.IntArray, kotlin.String> origin=null reflectionTarget=<same>
FUNCTION_REFERENCE 'public final fun withVararg (vararg xs: kotlin.Int): kotlin.String declared in <root>.Host' type=kotlin.reflect.KFunction1<kotlin.IntArray, kotlin.String> origin=null reflectionTarget=<same>
FUN name:testBoundReceiverLocalVal visibility:public modality:FINAL <> ($this:<root>.Host) returnType:kotlin.Unit
$this: VALUE_PARAMETER name:<this> type:<root>.Host
BLOCK_BODY
VAR name:h type:<root>.Host [val]
CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in <root>.Host' type=<root>.Host origin=null
ERROR_CALL 'Unresolved reference: <Inapplicable(INAPPLICABLE): [/use]>#' type=IrErrorType
FUNCTION_REFERENCE 'public final fun withVararg (xs: kotlin.IntArray): kotlin.String declared in <root>.Host' type=kotlin.reflect.KFunction1<kotlin.IntArray, kotlin.String> origin=null reflectionTarget=<same>
FUNCTION_REFERENCE 'public final fun withVararg (vararg xs: kotlin.Int): kotlin.String declared in <root>.Host' type=kotlin.reflect.KFunction1<kotlin.IntArray, kotlin.String> origin=null reflectionTarget=<same>
FUN name:testBoundReceiverLocalVar visibility:public modality:FINAL <> ($this:<root>.Host) returnType:kotlin.Unit
$this: VALUE_PARAMETER name:<this> type:<root>.Host
BLOCK_BODY
VAR name:h type:<root>.Host [var]
CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in <root>.Host' type=<root>.Host origin=null
ERROR_CALL 'Unresolved reference: <Inapplicable(INAPPLICABLE): [/use]>#' type=IrErrorType
FUNCTION_REFERENCE 'public final fun withVararg (xs: kotlin.IntArray): kotlin.String declared in <root>.Host' type=kotlin.reflect.KFunction1<kotlin.IntArray, kotlin.String> origin=null reflectionTarget=<same>
FUNCTION_REFERENCE 'public final fun withVararg (vararg xs: kotlin.Int): kotlin.String declared in <root>.Host' type=kotlin.reflect.KFunction1<kotlin.IntArray, kotlin.String> origin=null reflectionTarget=<same>
FUN name:testBoundReceiverParameter visibility:public modality:FINAL <> ($this:<root>.Host, h:<root>.Host) returnType:kotlin.Unit
$this: VALUE_PARAMETER name:<this> type:<root>.Host
VALUE_PARAMETER name:h index:0 type:<root>.Host
BLOCK_BODY
ERROR_CALL 'Unresolved reference: <Inapplicable(INAPPLICABLE): [/use]>#' type=IrErrorType
FUNCTION_REFERENCE 'public final fun withVararg (xs: kotlin.IntArray): kotlin.String declared in <root>.Host' type=kotlin.reflect.KFunction1<kotlin.IntArray, kotlin.String> origin=null reflectionTarget=<same>
FUNCTION_REFERENCE 'public final fun withVararg (vararg xs: kotlin.Int): kotlin.String declared in <root>.Host' type=kotlin.reflect.KFunction1<kotlin.IntArray, kotlin.String> origin=null reflectionTarget=<same>
FUN name:testBoundReceiverExpression visibility:public modality:FINAL <> ($this:<root>.Host) returnType:kotlin.Unit
$this: VALUE_PARAMETER name:<this> type:<root>.Host
BLOCK_BODY
ERROR_CALL 'Unresolved reference: <Inapplicable(INAPPLICABLE): [/use]>#' type=IrErrorType
FUNCTION_REFERENCE 'public final fun withVararg (xs: kotlin.IntArray): kotlin.String declared in <root>.Host' type=kotlin.reflect.KFunction1<kotlin.IntArray, kotlin.String> origin=null reflectionTarget=<same>
FUNCTION_REFERENCE 'public final fun withVararg (vararg xs: kotlin.Int): kotlin.String declared in <root>.Host' type=kotlin.reflect.KFunction1<kotlin.IntArray, kotlin.String> origin=null reflectionTarget=<same>
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator]
overridden:
public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any
@@ -1,11 +1,11 @@
FILE fqName:<root> fileName:/withVarargViewedAsArray.kt
FUN name:sum visibility:public modality:FINAL <> (args:kotlin.IntArray) returnType:kotlin.Int
VALUE_PARAMETER name:args index:0 type:kotlin.IntArray
VALUE_PARAMETER name:args index:0 type:kotlin.IntArray varargElementType:kotlin.Int [vararg]
BLOCK_BODY
VAR name:result type:kotlin.Int [var]
CONST Int type=kotlin.Int value=0
VAR IR_TEMPORARY_VARIABLE name:tmp_0 type:kotlin.IntArray [val]
GET_VAR 'args: kotlin.IntArray declared in <root>.sum' type=kotlin.IntArray origin=null
GET_VAR 'args: kotlin.IntArray [vararg] declared in <root>.sum' type=kotlin.IntArray origin=null
VAR IR_TEMPORARY_VARIABLE name:tmp_1 type:kotlin.collections.IntIterator [val]
CALL 'public final fun iterator (): kotlin.collections.IntIterator [operator] declared in kotlin.IntArray' type=kotlin.collections.IntIterator origin=null
$this: GET_VAR 'val tmp_0: kotlin.IntArray [val] declared in <root>.sum' type=kotlin.IntArray origin=null
@@ -20,26 +20,28 @@ FILE fqName:<root> fileName:/withVarargViewedAsArray.kt
CALL 'public final fun plus (other: kotlin.Int): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=null
$this: GET_VAR 'var result: kotlin.Int [var] declared in <root>.sum' type=kotlin.Int origin=null
other: GET_VAR 'val arg: kotlin.Int [val] declared in <root>.sum' type=kotlin.Int origin=null
RETURN type=kotlin.Nothing from='public final fun sum (args: kotlin.IntArray): kotlin.Int declared in <root>'
RETURN type=kotlin.Nothing from='public final fun sum (vararg args: kotlin.Int): kotlin.Int declared in <root>'
GET_VAR 'var result: kotlin.Int [var] declared in <root>.sum' type=kotlin.Int origin=null
FUN name:nsum visibility:public modality:FINAL <> (args:kotlin.Array<kotlin.Number>) returnType:kotlin.Int
VALUE_PARAMETER name:args index:0 type:kotlin.Array<kotlin.Number>
VALUE_PARAMETER name:args index:0 type:kotlin.Array<kotlin.Number> varargElementType:kotlin.Number [vararg]
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun nsum (args: kotlin.Array<kotlin.Number>): kotlin.Int declared in <root>'
CALL 'public final fun sum (args: kotlin.IntArray): kotlin.Int declared in <root>' type=kotlin.Int origin=null
args: CONSTRUCTOR_CALL 'public constructor <init> (size: kotlin.Int, init: kotlin.Function1<kotlin.Int, kotlin.Int>) declared in kotlin.IntArray' type=kotlin.IntArray origin=null
size: CALL 'public final fun <get-size> (): kotlin.Int declared in kotlin.Array' type=kotlin.Int origin=null
$this: GET_VAR 'args: kotlin.Array<kotlin.Number> declared in <root>.nsum' type=kotlin.Array<kotlin.Number> origin=null
init: FUN_EXPR type=kotlin.Function1<kotlin.Int, kotlin.Int> origin=LAMBDA
FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> (it:kotlin.Int) returnType:kotlin.Int
VALUE_PARAMETER name:it index:0 type:kotlin.Int
BLOCK_BODY
CALL 'public abstract fun toInt (): kotlin.Int declared in kotlin.Number' type=kotlin.Int origin=null
$this: CALL 'public final fun get (index: kotlin.Int): kotlin.Number [operator] declared in kotlin.Array' type=kotlin.Number origin=null
$this: GET_VAR 'args: kotlin.Array<kotlin.Number> declared in <root>.nsum' type=kotlin.Array<kotlin.Number> origin=null
index: GET_VAR 'it: kotlin.Int declared in <root>.nsum.<anonymous>' type=kotlin.Int origin=null
RETURN type=kotlin.Nothing from='public final fun nsum (vararg args: kotlin.Number): kotlin.Int declared in <root>'
CALL 'public final fun sum (vararg args: kotlin.Int): kotlin.Int declared in <root>' type=kotlin.Int origin=null
args: VARARG type=kotlin.IntArray varargElementType=kotlin.Int
SPREAD_ELEMENT
CONSTRUCTOR_CALL 'public constructor <init> (size: kotlin.Int, init: kotlin.Function1<kotlin.Int, kotlin.Int>) declared in kotlin.IntArray' type=kotlin.IntArray origin=null
size: CALL 'public final fun <get-size> (): kotlin.Int declared in kotlin.Array' type=kotlin.Int origin=null
$this: GET_VAR 'args: kotlin.Array<kotlin.Number> [vararg] declared in <root>.nsum' type=kotlin.Array<kotlin.Number> origin=null
init: FUN_EXPR type=kotlin.Function1<kotlin.Int, kotlin.Int> origin=LAMBDA
FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> (it:kotlin.Int) returnType:kotlin.Int
VALUE_PARAMETER name:it index:0 type:kotlin.Int
BLOCK_BODY
CALL 'public abstract fun toInt (): kotlin.Int declared in kotlin.Number' type=kotlin.Int origin=null
$this: CALL 'public final fun get (index: kotlin.Int): kotlin.Number [operator] declared in kotlin.Array' type=kotlin.Number origin=null
$this: GET_VAR 'args: kotlin.Array<kotlin.Number> [vararg] declared in <root>.nsum' type=kotlin.Array<kotlin.Number> origin=null
index: GET_VAR 'it: kotlin.Int declared in <root>.nsum.<anonymous>' type=kotlin.Int origin=null
FUN name:zap visibility:public modality:FINAL <> (b:kotlin.Array<kotlin.String>, k:kotlin.Int) returnType:kotlin.Unit
VALUE_PARAMETER name:b index:0 type:kotlin.Array<kotlin.String>
VALUE_PARAMETER name:b index:0 type:kotlin.Array<kotlin.String> varargElementType:kotlin.String [vararg]
VALUE_PARAMETER name:k index:1 type:kotlin.Int
EXPRESSION_BODY
CONST Int type=kotlin.Int value=42
@@ -59,16 +61,16 @@ FILE fqName:<root> fileName:/withVarargViewedAsArray.kt
FUN name:testPlainArgs visibility:public modality:FINAL <> () returnType:kotlin.Unit
BLOCK_BODY
ERROR_CALL 'Unresolved reference: <Inapplicable(INAPPLICABLE): [/usePlainArgs]>#' type=IrErrorType
FUNCTION_REFERENCE 'public final fun sum (args: kotlin.IntArray): kotlin.Int declared in <root>' type=kotlin.reflect.KFunction1<kotlin.IntArray, kotlin.Int> origin=null reflectionTarget=<same>
FUNCTION_REFERENCE 'public final fun sum (vararg args: kotlin.Int): kotlin.Int declared in <root>' type=kotlin.reflect.KFunction1<kotlin.IntArray, kotlin.Int> origin=null reflectionTarget=<same>
FUN name:testPrimitiveArrayAsVararg visibility:public modality:FINAL <> () returnType:kotlin.Unit
BLOCK_BODY
CALL 'public final fun usePrimitiveArray (fn: kotlin.Function1<kotlin.IntArray, kotlin.Int>): kotlin.Unit declared in <root>' type=kotlin.Unit origin=null
fn: FUNCTION_REFERENCE 'public final fun sum (args: kotlin.IntArray): kotlin.Int declared in <root>' type=kotlin.reflect.KFunction1<kotlin.IntArray, kotlin.Int> origin=null reflectionTarget=<same>
fn: FUNCTION_REFERENCE 'public final fun sum (vararg args: kotlin.Int): kotlin.Int declared in <root>' type=kotlin.reflect.KFunction1<kotlin.IntArray, kotlin.Int> origin=null reflectionTarget=<same>
FUN name:testArrayAsVararg visibility:public modality:FINAL <> () returnType:kotlin.Unit
BLOCK_BODY
ERROR_CALL 'Unresolved reference: <Inapplicable(INAPPLICABLE): [/useArray]>#' type=IrErrorType
FUNCTION_REFERENCE 'public final fun nsum (args: kotlin.Array<kotlin.Number>): kotlin.Int declared in <root>' type=kotlin.reflect.KFunction1<kotlin.Array<kotlin.Number>, kotlin.Int> origin=null reflectionTarget=<same>
FUNCTION_REFERENCE 'public final fun nsum (vararg args: kotlin.Number): kotlin.Int declared in <root>' type=kotlin.reflect.KFunction1<kotlin.Array<kotlin.Number>, kotlin.Int> origin=null reflectionTarget=<same>
FUN name:testArrayAndDefaults visibility:public modality:FINAL <> () returnType:kotlin.Unit
BLOCK_BODY
ERROR_CALL 'Unresolved reference: <Inapplicable(INAPPLICABLE): [/useStringArray]>#' type=IrErrorType
FUNCTION_REFERENCE 'public final fun zap (b: kotlin.Array<kotlin.String>, k: kotlin.Int): kotlin.Unit declared in <root>' type=kotlin.reflect.KFunction2<kotlin.Array<kotlin.String>, kotlin.Int, kotlin.Unit> origin=null reflectionTarget=<same>
FUNCTION_REFERENCE 'public final fun zap (vararg b: kotlin.String, k: kotlin.Int): kotlin.Unit declared in <root>' type=kotlin.reflect.KFunction2<kotlin.Array<kotlin.String>, kotlin.Int, kotlin.Unit> origin=null reflectionTarget=<same>
@@ -18,19 +18,20 @@ FILE fqName:<root> fileName:/samConversionInVarargs.kt
public open fun toString (): kotlin.String declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
FUN name:useVararg visibility:public modality:FINAL <> (foos:kotlin.Array<<root>.IFoo>) returnType:kotlin.Unit
VALUE_PARAMETER name:foos index:0 type:kotlin.Array<<root>.IFoo>
VALUE_PARAMETER name:foos index:0 type:kotlin.Array<<root>.IFoo> varargElementType:<root>.IFoo [vararg]
BLOCK_BODY
FUN name:testLambda visibility:public modality:FINAL <> () returnType:kotlin.Unit
BLOCK_BODY
CALL 'public final fun useVararg (foos: kotlin.Array<<root>.IFoo>): kotlin.Unit declared in <root>' type=kotlin.Unit origin=null
foos: FUN_EXPR type=kotlin.Function1<kotlin.Int, kotlin.Unit> origin=LAMBDA
ERROR_CALL 'Cannot bind 2 arguments to useVararg call with 1 parameters' type=kotlin.Unit
FUN_EXPR type=kotlin.Function1<kotlin.Int, kotlin.Unit> origin=LAMBDA
FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> (it:kotlin.Int) returnType:kotlin.Unit
VALUE_PARAMETER name:it index:0 type:kotlin.Int
BLOCK_BODY
GET_OBJECT 'CLASS IR_EXTERNAL_DECLARATION_STUB OBJECT name:Unit modality:FINAL visibility:public superTypes:[kotlin.Any]' type=kotlin.Unit
VARARG type=kotlin.Array<<root>.IFoo> varargElementType=<root>.IFoo
FUN name:testSeveralLambdas visibility:public modality:FINAL <> () returnType:kotlin.Unit
BLOCK_BODY
ERROR_CALL 'Cannot bind 3 arguments to useVararg call with 1 parameters' type=kotlin.Unit
ERROR_CALL 'Cannot bind 4 arguments to useVararg call with 1 parameters' type=kotlin.Unit
FUN_EXPR type=kotlin.Function1<kotlin.Int, kotlin.Unit> origin=LAMBDA
FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> (it:kotlin.Int) returnType:kotlin.Unit
VALUE_PARAMETER name:it index:0 type:kotlin.Int
@@ -46,12 +47,13 @@ FILE fqName:<root> fileName:/samConversionInVarargs.kt
VALUE_PARAMETER name:it index:0 type:kotlin.Int
BLOCK_BODY
GET_OBJECT 'CLASS IR_EXTERNAL_DECLARATION_STUB OBJECT name:Unit modality:FINAL visibility:public superTypes:[kotlin.Any]' type=kotlin.Unit
VARARG type=kotlin.Array<<root>.IFoo> varargElementType=<root>.IFoo
FUN name:withVarargOfInt visibility:public modality:FINAL <> (xs:kotlin.IntArray) returnType:kotlin.String
VALUE_PARAMETER name:xs index:0 type:kotlin.IntArray
VALUE_PARAMETER name:xs index:0 type:kotlin.IntArray varargElementType:kotlin.Int [vararg]
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun withVarargOfInt (xs: kotlin.IntArray): kotlin.String declared in <root>'
RETURN type=kotlin.Nothing from='public final fun withVarargOfInt (vararg xs: kotlin.Int): kotlin.String declared in <root>'
CONST String type=kotlin.String value=""
FUN name:testAdaptedCR visibility:public modality:FINAL <> () returnType:kotlin.Unit
BLOCK_BODY
ERROR_CALL 'Unresolved reference: <Inapplicable(INAPPLICABLE): [/useVararg]>#' type=IrErrorType
FUNCTION_REFERENCE 'public final fun withVarargOfInt (xs: kotlin.IntArray): kotlin.String declared in <root>' type=kotlin.reflect.KFunction1<kotlin.IntArray, kotlin.String> origin=null reflectionTarget=<same>
FUNCTION_REFERENCE 'public final fun withVarargOfInt (vararg xs: kotlin.Int): kotlin.String declared in <root>' type=kotlin.reflect.KFunction1<kotlin.IntArray, kotlin.String> origin=null reflectionTarget=<same>
@@ -19,9 +19,9 @@ FILE fqName:<root> fileName:/samConversionOnCallableReference.kt
FUN name:foo0 visibility:public modality:FINAL <> () returnType:kotlin.Unit
BLOCK_BODY
FUN name:foo1 visibility:public modality:FINAL <> (xs:kotlin.IntArray) returnType:kotlin.Int
VALUE_PARAMETER name:xs index:0 type:kotlin.IntArray
VALUE_PARAMETER name:xs index:0 type:kotlin.IntArray varargElementType:kotlin.Int [vararg]
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun foo1 (xs: kotlin.IntArray): kotlin.Int declared in <root>'
RETURN type=kotlin.Nothing from='public final fun foo1 (vararg xs: kotlin.Int): kotlin.Int declared in <root>'
CONST Int type=kotlin.Int value=1
FUN name:use visibility:public modality:FINAL <> (r:<root>.KRunnable) returnType:kotlin.Unit
VALUE_PARAMETER name:r index:0 type:<root>.KRunnable
@@ -35,7 +35,7 @@ FILE fqName:<root> fileName:/samConversionOnCallableReference.kt
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun testSamCosntructorOnAdapted (): IrErrorType declared in <root>'
ERROR_CALL 'Unresolved reference: <Inapplicable(INAPPLICABLE): [/KRunnable]>#' type=IrErrorType
FUNCTION_REFERENCE 'public final fun foo1 (xs: kotlin.IntArray): kotlin.Int declared in <root>' type=kotlin.reflect.KFunction1<kotlin.IntArray, kotlin.Int> origin=null reflectionTarget=<same>
FUNCTION_REFERENCE 'public final fun foo1 (vararg xs: kotlin.Int): kotlin.Int declared in <root>' type=kotlin.reflect.KFunction1<kotlin.IntArray, kotlin.Int> origin=null reflectionTarget=<same>
FUN name:testSamConversion visibility:public modality:FINAL <> () returnType:kotlin.Unit
BLOCK_BODY
CALL 'public final fun use (r: <root>.KRunnable): kotlin.Unit declared in <root>' type=kotlin.Unit origin=null
@@ -43,4 +43,4 @@ FILE fqName:<root> fileName:/samConversionOnCallableReference.kt
FUN name:testSamConversionOnAdapted visibility:public modality:FINAL <> () returnType:kotlin.Unit
BLOCK_BODY
ERROR_CALL 'Unresolved reference: <Inapplicable(INAPPLICABLE): [/use]>#' type=IrErrorType
FUNCTION_REFERENCE 'public final fun foo1 (xs: kotlin.IntArray): kotlin.Int declared in <root>' type=kotlin.reflect.KFunction1<kotlin.IntArray, kotlin.Int> origin=null reflectionTarget=<same>
FUNCTION_REFERENCE 'public final fun foo1 (vararg xs: kotlin.Int): kotlin.Int declared in <root>' type=kotlin.reflect.KFunction1<kotlin.IntArray, kotlin.Int> origin=null reflectionTarget=<same>
@@ -17,10 +17,11 @@ FILE fqName:<root> fileName:/incrementDecrement.kt
PROPERTY name:arr visibility:public modality:FINAL [val]
FIELD PROPERTY_BACKING_FIELD name:arr type:kotlin.IntArray visibility:private [final,static]
EXPRESSION_BODY
ERROR_CALL 'Cannot bind 3 arguments to intArrayOf call with 1 parameters' type=kotlin.IntArray
CONST Int type=kotlin.Int value=1
CONST Int type=kotlin.Int value=2
CONST Int type=kotlin.Int value=3
CALL 'public final fun intArrayOf (vararg elements: kotlin.Int): kotlin.IntArray declared in kotlin' type=kotlin.IntArray origin=null
elements: VARARG type=kotlin.IntArray varargElementType=kotlin.Int
CONST Int type=kotlin.Int value=1
CONST Int type=kotlin.Int value=2
CONST Int type=kotlin.Int value=3
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-arr> visibility:public modality:FINAL <> () returnType:kotlin.IntArray
correspondingProperty: PROPERTY name:arr visibility:public modality:FINAL [val]
BLOCK_BODY
+7 -5
View File
@@ -20,9 +20,9 @@ FILE fqName:<root> fileName:/kt28456.kt
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
FUN name:get visibility:public modality:FINAL <> ($receiver:<root>.A, xs:kotlin.IntArray) returnType:kotlin.Int [operator]
$receiver: VALUE_PARAMETER name:<this> type:<root>.A
VALUE_PARAMETER name:xs index:0 type:kotlin.IntArray
VALUE_PARAMETER name:xs index:0 type:kotlin.IntArray varargElementType:kotlin.Int [vararg]
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun get (xs: kotlin.IntArray): kotlin.Int [operator] declared in <root>'
RETURN type=kotlin.Nothing from='public final fun get (vararg xs: kotlin.Int): kotlin.Int [operator] declared in <root>'
CONST Int type=kotlin.Int value=0
FUN name:set visibility:public modality:FINAL <> ($receiver:<root>.A, i:kotlin.Int, j:kotlin.Int, v:kotlin.Int) returnType:kotlin.Unit [operator]
$receiver: VALUE_PARAMETER name:<this> type:<root>.A
@@ -44,9 +44,11 @@ FILE fqName:<root> fileName:/kt28456.kt
RETURN type=kotlin.Nothing from='public final fun testPostfixIncrement (a: <root>.A): kotlin.Int declared in <root>'
BLOCK type=kotlin.Int origin=null
VAR IR_TEMPORARY_VARIABLE name:tmp_0 type:kotlin.Int [val]
ERROR_CALL 'Cannot bind 2 arguments to get call with 1 parameters' type=kotlin.Int
CONST Int type=kotlin.Int value=1
CONST Int type=kotlin.Int value=2
CALL 'public final fun get (vararg xs: kotlin.Int): kotlin.Int [operator] declared in <root>' type=kotlin.Int origin=null
$receiver: GET_VAR 'a: <root>.A declared in <root>.testPostfixIncrement' type=<root>.A origin=null
xs: VARARG type=kotlin.IntArray varargElementType=kotlin.Int
CONST Int type=kotlin.Int value=1
CONST Int type=kotlin.Int value=2
CALL 'public final fun set (i: kotlin.Int, j: kotlin.Int, v: kotlin.Int): kotlin.Unit [operator] declared in <root>' type=kotlin.Unit origin=null
$receiver: GET_VAR 'a: <root>.A declared in <root>.testPostfixIncrement' type=<root>.A origin=null
i: CONST Int type=kotlin.Int value=1
+1 -1
View File
@@ -20,7 +20,7 @@ FILE fqName:<root> fileName:/kt28456a.kt
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
FUN name:set visibility:public modality:FINAL <> ($receiver:<root>.A, i:kotlin.IntArray, v:kotlin.Int) returnType:kotlin.Unit [operator]
$receiver: VALUE_PARAMETER name:<this> type:<root>.A
VALUE_PARAMETER name:i index:0 type:kotlin.IntArray
VALUE_PARAMETER name:i index:0 type:kotlin.IntArray varargElementType:kotlin.Int [vararg]
VALUE_PARAMETER name:v index:1 type:kotlin.Int
BLOCK_BODY
FUN name:testSimpleAssignment visibility:public modality:FINAL <> (a:<root>.A) returnType:kotlin.Unit
@@ -78,7 +78,7 @@ FILE fqName:<root> fileName:/signedToUnsignedConversions_test.kt
VALUE_PARAMETER name:u index:0 type:kotlin.ULong
BLOCK_BODY
FUN name:takeUBytes visibility:public modality:FINAL <> (u:kotlin.Array<kotlin.UByte>) returnType:kotlin.Unit
VALUE_PARAMETER name:u index:0 type:kotlin.Array<kotlin.UByte>
VALUE_PARAMETER name:u index:0 type:kotlin.Array<kotlin.UByte> varargElementType:kotlin.UByte [vararg]
BLOCK_BODY
FUN name:takeLong visibility:public modality:FINAL <> (l:kotlin.Long) returnType:kotlin.Unit
VALUE_PARAMETER name:l index:0 type:kotlin.Long
+7 -5
View File
@@ -2,7 +2,7 @@ FILE fqName:<root> fileName:/vararg.kt
PROPERTY name:test1 visibility:public modality:FINAL [val]
FIELD PROPERTY_BACKING_FIELD name:test1 type:kotlin.Array<kotlin.String> visibility:private [final,static]
EXPRESSION_BODY
CALL 'public final fun arrayOf <T> (elements: kotlin.Array<out T of kotlin.arrayOf>): kotlin.Array<T of kotlin.arrayOf> [inline] declared in kotlin' type=kotlin.Array<kotlin.String> origin=null
CALL 'public final fun arrayOf <T> (vararg elements: T of kotlin.arrayOf): kotlin.Array<T of kotlin.arrayOf> [inline] declared in kotlin' type=kotlin.Array<kotlin.String> origin=null
<T>: kotlin.String
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-test1> visibility:public modality:FINAL <> () returnType:kotlin.Array<kotlin.String>
correspondingProperty: PROPERTY name:test1 visibility:public modality:FINAL [val]
@@ -12,10 +12,12 @@ FILE fqName:<root> fileName:/vararg.kt
PROPERTY name:test2 visibility:public modality:FINAL [val]
FIELD PROPERTY_BACKING_FIELD name:test2 type:kotlin.Array<kotlin.String> visibility:private [final,static]
EXPRESSION_BODY
ERROR_CALL 'Cannot bind 3 arguments to arrayOf call with 1 parameters' type=kotlin.Array<kotlin.String>
CONST String type=kotlin.String value="1"
CONST String type=kotlin.String value="2"
CONST String type=kotlin.String value="3"
CALL 'public final fun arrayOf <T> (vararg elements: T of kotlin.arrayOf): kotlin.Array<T of kotlin.arrayOf> [inline] declared in kotlin' type=kotlin.Array<kotlin.String> origin=null
<T>: kotlin.String
elements: VARARG type=kotlin.Array<out kotlin.String> varargElementType=kotlin.String
CONST String type=kotlin.String value="1"
CONST String type=kotlin.String value="2"
CONST String type=kotlin.String value="3"
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-test2> visibility:public modality:FINAL <> () returnType:kotlin.Array<kotlin.String>
correspondingProperty: PROPERTY name:test2 visibility:public modality:FINAL [val]
BLOCK_BODY
@@ -1,27 +0,0 @@
FILE fqName:<root> fileName:/varargWithImplicitCast.kt
FUN name:testScalar visibility:public modality:FINAL <> (a:kotlin.Any) returnType:kotlin.IntArray
VALUE_PARAMETER name:a index:0 type:kotlin.Any
BLOCK_BODY
WHEN type=kotlin.Unit origin=IF
BRANCH
if: TYPE_OP type=kotlin.Boolean origin=NOT_INSTANCEOF typeOperand=kotlin.Int
GET_VAR 'a: kotlin.Any declared in <root>.testScalar' type=kotlin.Any origin=null
then: RETURN type=kotlin.Nothing from='public final fun testScalar (a: kotlin.Any): kotlin.IntArray declared in <root>'
CALL 'public final fun intArrayOf (elements: kotlin.IntArray): kotlin.IntArray declared in kotlin' type=kotlin.IntArray origin=null
RETURN type=kotlin.Nothing from='public final fun testScalar (a: kotlin.Any): kotlin.IntArray declared in <root>'
CALL 'public final fun intArrayOf (elements: kotlin.IntArray): kotlin.IntArray declared in kotlin' type=kotlin.IntArray origin=null
elements: TYPE_OP type=kotlin.Int origin=IMPLICIT_CAST typeOperand=kotlin.Int
GET_VAR 'a: kotlin.Any declared in <root>.testScalar' type=kotlin.Any origin=null
FUN name:testSpread visibility:public modality:FINAL <> (a:kotlin.Any) returnType:kotlin.IntArray
VALUE_PARAMETER name:a index:0 type:kotlin.Any
BLOCK_BODY
WHEN type=kotlin.Unit origin=IF
BRANCH
if: TYPE_OP type=kotlin.Boolean origin=NOT_INSTANCEOF typeOperand=kotlin.IntArray
GET_VAR 'a: kotlin.Any declared in <root>.testSpread' type=kotlin.Any origin=null
then: RETURN type=kotlin.Nothing from='public final fun testSpread (a: kotlin.Any): kotlin.IntArray declared in <root>'
CALL 'public final fun intArrayOf (elements: kotlin.IntArray): kotlin.IntArray declared in kotlin' type=kotlin.IntArray origin=null
RETURN type=kotlin.Nothing from='public final fun testSpread (a: kotlin.Any): kotlin.IntArray declared in <root>'
CALL 'public final fun intArrayOf (elements: kotlin.IntArray): kotlin.IntArray declared in kotlin' type=kotlin.IntArray origin=null
elements: TYPE_OP type=kotlin.IntArray origin=IMPLICIT_CAST typeOperand=kotlin.IntArray
GET_VAR 'a: kotlin.Any declared in <root>.testSpread' type=kotlin.Any origin=null
@@ -1,3 +1,5 @@
// FIR_IDENTICAL
fun testScalar(a: Any): IntArray {
if (a !is Int) return intArrayOf()
return intArrayOf(a)
@@ -52,15 +52,17 @@ FILE fqName:<root> fileName:/intersectionType1_NI.kt
FUN name:test visibility:public modality:FINAL <> () returnType:kotlin.Unit
BLOCK_BODY
VAR name:a1 type:kotlin.Array<<root>.In<kotlin.Int>> [val]
CALL 'public final fun arrayOf <T> (elements: kotlin.Array<out T of kotlin.arrayOf>): kotlin.Array<T of kotlin.arrayOf> [inline] declared in kotlin' type=kotlin.Array<<root>.In<kotlin.Int>> origin=null
CALL 'public final fun arrayOf <T> (vararg elements: T of kotlin.arrayOf): kotlin.Array<T of kotlin.arrayOf> [inline] declared in kotlin' type=kotlin.Array<<root>.In<kotlin.Int>> origin=null
<T>: <root>.In<kotlin.Int>
elements: CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in <root>.In' type=<root>.In<kotlin.Int> origin=null
<class: I>: kotlin.Int
elements: VARARG type=kotlin.Array<out <root>.In<kotlin.Int>> varargElementType=<root>.In<kotlin.Int>
CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in <root>.In' type=<root>.In<kotlin.Int> origin=null
<class: I>: kotlin.Int
VAR name:a2 type:kotlin.Array<<root>.In<kotlin.String>> [val]
CALL 'public final fun arrayOf <T> (elements: kotlin.Array<out T of kotlin.arrayOf>): kotlin.Array<T of kotlin.arrayOf> [inline] declared in kotlin' type=kotlin.Array<<root>.In<kotlin.String>> origin=null
CALL 'public final fun arrayOf <T> (vararg elements: T of kotlin.arrayOf): kotlin.Array<T of kotlin.arrayOf> [inline] declared in kotlin' type=kotlin.Array<<root>.In<kotlin.String>> origin=null
<T>: <root>.In<kotlin.String>
elements: CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in <root>.In' type=<root>.In<kotlin.String> origin=null
<class: I>: kotlin.String
elements: VARARG type=kotlin.Array<out <root>.In<kotlin.String>> varargElementType=<root>.In<kotlin.String>
CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in <root>.In' type=<root>.In<kotlin.String> origin=null
<class: I>: kotlin.String
CALL 'public final fun foo <T> (a: kotlin.Array<<root>.In<T of <root>.foo>>, b: kotlin.Array<<root>.In<kotlin.String>>): kotlin.Boolean declared in <root>' type=kotlin.Boolean origin=null
<T>: kotlin.Int
a: GET_VAR 'val a1: kotlin.Array<<root>.In<kotlin.Int>> [val] declared in <root>.test' type=kotlin.Array<<root>.In<kotlin.Int>> origin=null
@@ -52,15 +52,17 @@ FILE fqName:<root> fileName:/intersectionType1_OI.kt
FUN name:test visibility:public modality:FINAL <> () returnType:kotlin.Unit
BLOCK_BODY
VAR name:a1 type:kotlin.Array<<root>.In<kotlin.Int>> [val]
CALL 'public final fun arrayOf <T> (elements: kotlin.Array<out T of kotlin.arrayOf>): kotlin.Array<T of kotlin.arrayOf> [inline] declared in kotlin' type=kotlin.Array<<root>.In<kotlin.Int>> origin=null
CALL 'public final fun arrayOf <T> (vararg elements: T of kotlin.arrayOf): kotlin.Array<T of kotlin.arrayOf> [inline] declared in kotlin' type=kotlin.Array<<root>.In<kotlin.Int>> origin=null
<T>: <root>.In<kotlin.Int>
elements: CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in <root>.In' type=<root>.In<kotlin.Int> origin=null
<class: I>: kotlin.Int
elements: VARARG type=kotlin.Array<out <root>.In<kotlin.Int>> varargElementType=<root>.In<kotlin.Int>
CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in <root>.In' type=<root>.In<kotlin.Int> origin=null
<class: I>: kotlin.Int
VAR name:a2 type:kotlin.Array<<root>.In<kotlin.String>> [val]
CALL 'public final fun arrayOf <T> (elements: kotlin.Array<out T of kotlin.arrayOf>): kotlin.Array<T of kotlin.arrayOf> [inline] declared in kotlin' type=kotlin.Array<<root>.In<kotlin.String>> origin=null
CALL 'public final fun arrayOf <T> (vararg elements: T of kotlin.arrayOf): kotlin.Array<T of kotlin.arrayOf> [inline] declared in kotlin' type=kotlin.Array<<root>.In<kotlin.String>> origin=null
<T>: <root>.In<kotlin.String>
elements: CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in <root>.In' type=<root>.In<kotlin.String> origin=null
<class: I>: kotlin.String
elements: VARARG type=kotlin.Array<out <root>.In<kotlin.String>> varargElementType=<root>.In<kotlin.String>
CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in <root>.In' type=<root>.In<kotlin.String> origin=null
<class: I>: kotlin.String
CALL 'public final fun foo <T> (a: kotlin.Array<<root>.In<T of <root>.foo>>, b: kotlin.Array<<root>.In<kotlin.String>>): kotlin.Boolean declared in <root>' type=kotlin.Boolean origin=null
<T>: kotlin.Int
a: GET_VAR 'val a1: kotlin.Array<<root>.In<kotlin.Int>> [val] declared in <root>.test' type=kotlin.Array<<root>.In<kotlin.Int>> origin=null