diff --git a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/TransformUtils.kt b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/TransformUtils.kt index 583818969e2..e6bcbca3486 100644 --- a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/TransformUtils.kt +++ b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/TransformUtils.kt @@ -136,7 +136,7 @@ internal fun FirValueParameter.transformVarargTypeToArrayType() { val returnType = returnTypeRef.coneTypeUnsafe() transformReturnTypeRef( StoreType, - returnTypeRef.withReplacedConeType(returnType.createArrayOf(session)) + returnTypeRef.withReplacedConeType(ConeKotlinTypeProjectionOut(returnType).createArrayOf(session)) ) } } \ No newline at end of file diff --git a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/types/ArrayUtils.kt b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/types/ArrayUtils.kt index a9925249452..0332b4556d6 100644 --- a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/types/ArrayUtils.kt +++ b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/types/ArrayUtils.kt @@ -13,13 +13,16 @@ import org.jetbrains.kotlin.fir.symbols.StandardClassIds import org.jetbrains.kotlin.fir.symbols.invoke -fun ConeKotlinType.createArrayOf(session: FirSession, nullable: Boolean = false): ConeKotlinType { +fun ConeTypeProjection.createArrayOf(session: FirSession, nullable: Boolean = false): ConeKotlinType { val symbolProvider: FirSymbolProvider = session.firSymbolProvider - val type = lowerBoundIfFlexible() - if (type is ConeClassLikeType) { - val primitiveArrayId = StandardClassIds.primitiveArrayTypeByElementType[type.lookupTag.classId] - if (primitiveArrayId != null) { - return primitiveArrayId.invoke(symbolProvider).constructType(emptyArray(), nullable) + + if (this is ConeKotlinTypeProjection) { + val type = type.lowerBoundIfFlexible() + if (type is ConeClassLikeType) { + val primitiveArrayId = StandardClassIds.primitiveArrayTypeByElementType[type.lookupTag.classId] + if (primitiveArrayId != null) { + return primitiveArrayId.invoke(symbolProvider).constructType(emptyArray(), nullable) + } } } diff --git a/compiler/fir/resolve/testData/resolve/arguments/default.txt b/compiler/fir/resolve/testData/resolve/arguments/default.txt index bdd63e6f7fa..b8e5db76369 100644 --- a/compiler/fir/resolve/testData/resolve/arguments/default.txt +++ b/compiler/fir/resolve/testData/resolve/arguments/default.txt @@ -3,7 +3,7 @@ FILE: default.kt } public final fun bar(first: R|kotlin/Int|, second: R|kotlin/Double| = Double(2.71), third: R|kotlin/Boolean|, fourth: R|kotlin/String| = String()): R|kotlin/Unit| { } - public final fun baz(x: R|kotlin/Int|, vararg y: R|kotlin/Array|, z: R|kotlin/Boolean| = Boolean(false)): R|kotlin/Unit| { + public final fun baz(x: R|kotlin/Int|, vararg y: R|kotlin/Array|, z: R|kotlin/Boolean| = Boolean(false)): R|kotlin/Unit| { } public final fun test(): R|kotlin/Unit| { R|/foo|(Int(1)) diff --git a/compiler/fir/resolve/testData/resolve/arguments/vararg.txt b/compiler/fir/resolve/testData/resolve/arguments/vararg.txt index 693c918a172..0c1f2e2e558 100644 --- a/compiler/fir/resolve/testData/resolve/arguments/vararg.txt +++ b/compiler/fir/resolve/testData/resolve/arguments/vararg.txt @@ -1,7 +1,7 @@ FILE: vararg.kt - public final fun foo(x: R|kotlin/Int|, vararg y: R|kotlin/Array|): R|kotlin/Unit| { + public final fun foo(x: R|kotlin/Int|, vararg y: R|kotlin/Array|): R|kotlin/Unit| { } - public final fun bar(x: R|kotlin/Int|, vararg y: R|kotlin/Array|, z: R|kotlin/Boolean|): R|kotlin/Unit| { + public final fun bar(x: R|kotlin/Int|, vararg y: R|kotlin/Array|, z: R|kotlin/Boolean|): R|kotlin/Unit| { } public final fun test(): R|kotlin/Unit| { R|/foo|(Int(1)) diff --git a/compiler/fir/resolve/testData/resolve/arguments/varargProjection.kt b/compiler/fir/resolve/testData/resolve/arguments/varargProjection.kt new file mode 100644 index 00000000000..5f7aae988c3 --- /dev/null +++ b/compiler/fir/resolve/testData/resolve/arguments/varargProjection.kt @@ -0,0 +1,9 @@ +open class Base +class Sub : Base() + +fun foo(vararg arg: Base) {} + +fun bar(base: Array, sub: Array) { + foo(*base) + foo(*sub) +} \ No newline at end of file diff --git a/compiler/fir/resolve/testData/resolve/arguments/varargProjection.txt b/compiler/fir/resolve/testData/resolve/arguments/varargProjection.txt new file mode 100644 index 00000000000..e11cbb560d4 --- /dev/null +++ b/compiler/fir/resolve/testData/resolve/arguments/varargProjection.txt @@ -0,0 +1,19 @@ +FILE: varargProjection.kt + public open class Base : R|kotlin/Any| { + public constructor(): R|Base| { + super() + } + + } + public final class Sub : R|Base| { + public constructor(): R|Sub| { + super() + } + + } + public final fun foo(vararg arg: R|kotlin/Array|): R|kotlin/Unit| { + } + public final fun bar(base: R|kotlin/Array|, sub: R|kotlin/Array|): R|kotlin/Unit| { + R|/foo|(vararg(*R|/base|)) + R|/foo|(vararg(*R|/sub|)) + } diff --git a/compiler/fir/resolve/testData/resolve/cfg/postponedLambdas.txt b/compiler/fir/resolve/testData/resolve/cfg/postponedLambdas.txt index f23e8c10ef8..7f1ec58a3b1 100644 --- a/compiler/fir/resolve/testData/resolve/cfg/postponedLambdas.txt +++ b/compiler/fir/resolve/testData/resolve/cfg/postponedLambdas.txt @@ -1,5 +1,5 @@ FILE: postponedLambdas.kt - public final inline fun foo(vararg x: R|kotlin/Array|): R|kotlin/Unit| { + public final inline fun foo(vararg x: R|kotlin/Array|): R|kotlin/Unit| { } public final fun test(a: R|kotlin/Any|, b: R|kotlin/Any|, c: R|kotlin/Any|): R|kotlin/Unit| { R|/foo|(vararg(R|/a|, foo@fun (): R|kotlin/String| { diff --git a/compiler/fir/resolve/testData/resolve/expresssions/enumEntryUse.txt b/compiler/fir/resolve/testData/resolve/expresssions/enumEntryUse.txt index 65a7451968c..f860c8aba1e 100644 --- a/compiler/fir/resolve/testData/resolve/expresssions/enumEntryUse.txt +++ b/compiler/fir/resolve/testData/resolve/expresssions/enumEntryUse.txt @@ -27,7 +27,7 @@ FILE: enumEntryUse.kt } public final fun useEnum(some: R|TestEnum|): R|kotlin/Unit| { } - public final fun useVararg(vararg some: R|kotlin/Array|): R|kotlin/Unit| { + public final fun useVararg(vararg some: R|kotlin/Array|): R|kotlin/Unit| { } public final fun test(): R|kotlin/Unit| { R|/use|(Q|TestEnum|.R|/TestEnum.FIRST|) diff --git a/compiler/fir/resolve/testData/resolve/expresssions/vararg.txt b/compiler/fir/resolve/testData/resolve/expresssions/vararg.txt index 037d1a3392c..c88fea6c1e5 100644 --- a/compiler/fir/resolve/testData/resolve/expresssions/vararg.txt +++ b/compiler/fir/resolve/testData/resolve/expresssions/vararg.txt @@ -1,5 +1,5 @@ FILE: vararg.kt - public final fun foo(vararg x: R|kotlin/Array|): R|kotlin/Unit| { + public final fun foo(vararg x: R|kotlin/Array|): R|kotlin/Unit| { } public final fun foo(): R|kotlin/Unit| { } diff --git a/compiler/fir/resolve/testData/resolve/spreadOperator.txt b/compiler/fir/resolve/testData/resolve/spreadOperator.txt index 499c4159c85..196fc39dbae 100644 --- a/compiler/fir/resolve/testData/resolve/spreadOperator.txt +++ b/compiler/fir/resolve/testData/resolve/spreadOperator.txt @@ -1,5 +1,5 @@ FILE: Main.kt - public final fun myListOf(vararg elements: R|kotlin/Array|): R|kotlin/collections/List| { + public final fun myListOf(vararg elements: R|kotlin/Array|): R|kotlin/collections/List| { ^myListOf Null(null)!! } public final fun myListOf(element: R|T|): R|kotlin/collections/List| { diff --git a/compiler/fir/resolve/testData/resolve/varargInPrimaryConstructor.txt b/compiler/fir/resolve/testData/resolve/varargInPrimaryConstructor.txt index cff64c7dd54..eb2b64e4d48 100644 --- a/compiler/fir/resolve/testData/resolve/varargInPrimaryConstructor.txt +++ b/compiler/fir/resolve/testData/resolve/varargInPrimaryConstructor.txt @@ -1,6 +1,6 @@ FILE: varargInPrimaryConstructor.kt public final class Foo : R|kotlin/Any| { - public constructor(vararg strings: R|kotlin/Array|): R|Foo| { + public constructor(vararg strings: R|kotlin/Array|): R|Foo| { super() } @@ -16,7 +16,7 @@ FILE: varargInPrimaryConstructor.kt } } - public final fun test_2(vararg strings: R|kotlin/Array|): R|kotlin/Unit| { + public final fun test_2(vararg strings: R|kotlin/Array|): R|kotlin/Unit| { lval : R|kotlin/collections/Iterator| = R|/strings|.R|FakeOverride|>|() while(R|/|.R|kotlin/collections/Iterator.hasNext|()) { lval s: R|kotlin/String| = R|/|.R|FakeOverride|() diff --git a/compiler/fir/resolve/testData/resolveWithStdlib/arrayInLocal.txt b/compiler/fir/resolve/testData/resolveWithStdlib/arrayInLocal.txt index 6f4272458de..3fb677832c7 100644 --- a/compiler/fir/resolve/testData/resolveWithStdlib/arrayInLocal.txt +++ b/compiler/fir/resolve/testData/resolveWithStdlib/arrayInLocal.txt @@ -1,6 +1,6 @@ FILE: arrayInLocal.kt public final fun foo(): R|kotlin/Unit| { - local final fun convert(vararg paths: R|kotlin/Array|): R|kotlin/Array| { + local final fun convert(vararg paths: R|kotlin/Array|): R|kotlin/Array| { ^convert R|/paths|.R|kotlin/collections/toList|().R|kotlin/collections/toTypedArray|() } diff --git a/compiler/fir/resolve/tests/org/jetbrains/kotlin/fir/FirDiagnosticsTestGenerated.java b/compiler/fir/resolve/tests/org/jetbrains/kotlin/fir/FirDiagnosticsTestGenerated.java index 071cbfc2265..d0fb0c37a22 100644 --- a/compiler/fir/resolve/tests/org/jetbrains/kotlin/fir/FirDiagnosticsTestGenerated.java +++ b/compiler/fir/resolve/tests/org/jetbrains/kotlin/fir/FirDiagnosticsTestGenerated.java @@ -449,6 +449,11 @@ public class FirDiagnosticsTestGenerated extends AbstractFirDiagnosticsTest { public void testVararg() throws Exception { runTest("compiler/fir/resolve/testData/resolve/arguments/vararg.kt"); } + + @TestMetadata("varargProjection.kt") + public void testVarargProjection() throws Exception { + runTest("compiler/fir/resolve/testData/resolve/arguments/varargProjection.kt"); + } } @TestMetadata("compiler/fir/resolve/testData/resolve/builtins") diff --git a/compiler/fir/resolve/tests/org/jetbrains/kotlin/fir/FirDiagnosticsWithLightTreeTestGenerated.java b/compiler/fir/resolve/tests/org/jetbrains/kotlin/fir/FirDiagnosticsWithLightTreeTestGenerated.java index 334f742249f..bce8204a368 100644 --- a/compiler/fir/resolve/tests/org/jetbrains/kotlin/fir/FirDiagnosticsWithLightTreeTestGenerated.java +++ b/compiler/fir/resolve/tests/org/jetbrains/kotlin/fir/FirDiagnosticsWithLightTreeTestGenerated.java @@ -449,6 +449,11 @@ public class FirDiagnosticsWithLightTreeTestGenerated extends AbstractFirDiagnos public void testVararg() throws Exception { runTest("compiler/fir/resolve/testData/resolve/arguments/vararg.kt"); } + + @TestMetadata("varargProjection.kt") + public void testVarargProjection() throws Exception { + runTest("compiler/fir/resolve/testData/resolve/arguments/varargProjection.kt"); + } } @TestMetadata("compiler/fir/resolve/testData/resolve/builtins") diff --git a/compiler/testData/diagnostics/tests/callableReference/resolve/callableReferenceToVarargWithOverload.fir.kt b/compiler/testData/diagnostics/tests/callableReference/resolve/callableReferenceToVarargWithOverload.fir.kt index 0047654e4b4..eacdd3e44de 100644 --- a/compiler/testData/diagnostics/tests/callableReference/resolve/callableReferenceToVarargWithOverload.fir.kt +++ b/compiler/testData/diagnostics/tests/callableReference/resolve/callableReferenceToVarargWithOverload.fir.kt @@ -12,5 +12,5 @@ fun Foo.bar(vararg x: Int) = "" fun actualTest() { - test(Foo::bar) + test(Foo::bar) } diff --git a/compiler/testData/diagnostics/tests/generics/projectionsScope/varargs.fir.kt b/compiler/testData/diagnostics/tests/generics/projectionsScope/varargs.fir.kt index bb2deafe59f..0d6b3130aad 100644 --- a/compiler/testData/diagnostics/tests/generics/projectionsScope/varargs.fir.kt +++ b/compiler/testData/diagnostics/tests/generics/projectionsScope/varargs.fir.kt @@ -7,7 +7,7 @@ class A { fun test(a: A, y: Array) { a.foo("", "", "") - a.foo(*y) + a.foo(*y) // TODO: TYPE_MISMATCH_DUE_TO_TYPE_PROJECTIONS probably redundant - a.foo(*y, "") + a.foo(*y, "") } diff --git a/compiler/testData/diagnostics/tests/varargs/kt2163.fir.kt b/compiler/testData/diagnostics/tests/varargs/kt2163.fir.kt index 79ea4dc8fb7..de27add96ab 100644 --- a/compiler/testData/diagnostics/tests/varargs/kt2163.fir.kt +++ b/compiler/testData/diagnostics/tests/varargs/kt2163.fir.kt @@ -3,5 +3,5 @@ fun printAll(vararg a : Any) {} fun main(args: Array) { - printAll(*args) // Shouldn't be an error + printAll(*args) // Shouldn't be an error } \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/varargs/varargViewedAsArray.fir.kt b/compiler/testData/diagnostics/tests/varargs/varargViewedAsArray.fir.kt index 56f505de853..ff170fe1c5a 100644 --- a/compiler/testData/diagnostics/tests/varargs/varargViewedAsArray.fir.kt +++ b/compiler/testData/diagnostics/tests/varargs/varargViewedAsArray.fir.kt @@ -19,7 +19,7 @@ fun useTwoStringArrays(fn: (Array, Array) -> Unit) = fn(arrayOf( fun test() { useStrings(::stringVararg) useStringArray(::stringVararg) - useIntArray(::numberVararg) + useIntArray(::numberVararg) usePrimitiveIntArray(::intVararg) useIntArray(::intVararg) useMixedStringArgs1(::stringVararg) diff --git a/compiler/testData/diagnostics/tests/varargs/varargsAndOut2.fir.kt b/compiler/testData/diagnostics/tests/varargs/varargsAndOut2.fir.kt index ed2a429bbf9..95fc2e692d3 100644 --- a/compiler/testData/diagnostics/tests/varargs/varargsAndOut2.fir.kt +++ b/compiler/testData/diagnostics/tests/varargs/varargsAndOut2.fir.kt @@ -4,6 +4,6 @@ fun bar(vararg a: String) {} fun test2(a: Array, b: Array) { bar(*a) - bar(*b) - bar("", *a, *b, "") + bar(*b) + bar("", *a, *b, "") } \ No newline at end of file diff --git a/compiler/testData/diagnostics/testsWithStdLib/varargs/kt5534.fir.kt b/compiler/testData/diagnostics/testsWithStdLib/varargs/kt5534.fir.kt index f98f23dd0ac..dbd93e1b8b5 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/varargs/kt5534.fir.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/varargs/kt5534.fir.kt @@ -1,6 +1,6 @@ fun test() { val p: Array = arrayOf("a") - foo(*p) + foo(*p) } fun foo(vararg a: String?) = a \ No newline at end of file diff --git a/compiler/testData/ir/irText/declarations/annotations/annotationsWithVarargParameters.fir.txt b/compiler/testData/ir/irText/declarations/annotations/annotationsWithVarargParameters.fir.txt index 0d8243df228..62a7f726b58 100644 --- a/compiler/testData/ir/irText/declarations/annotations/annotationsWithVarargParameters.fir.txt +++ b/compiler/testData/ir/irText/declarations/annotations/annotationsWithVarargParameters.fir.txt @@ -1,12 +1,12 @@ FILE fqName: fileName:/annotationsWithVarargParameters.kt CLASS ANNOTATION_CLASS name:A modality:FINAL visibility:public superTypes:[kotlin.Annotation] $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.A - CONSTRUCTOR visibility:public <> (xs:kotlin.Array) returnType:.A [primary] - VALUE_PARAMETER name:xs index:0 type:kotlin.Array varargElementType:kotlin.String [vararg] + CONSTRUCTOR visibility:public <> (xs:kotlin.Array) returnType:.A [primary] + VALUE_PARAMETER name:xs index:0 type:kotlin.Array varargElementType:kotlin.String [vararg] PROPERTY name:xs visibility:public modality:FINAL [val] FIELD PROPERTY_BACKING_FIELD name:xs type:kotlin.Array visibility:private [final] EXPRESSION_BODY - GET_VAR 'xs: kotlin.Array [vararg] declared in .A.' type=kotlin.Array origin=INITIALIZE_PROPERTY_FROM_PARAMETER + GET_VAR 'xs: kotlin.Array [vararg] declared in .A.' type=kotlin.Array origin=INITIALIZE_PROPERTY_FROM_PARAMETER FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> ($this:.A) returnType:kotlin.Array correspondingProperty: PROPERTY name:xs visibility:public modality:FINAL [val] $this: VALUE_PARAMETER name: type:.A diff --git a/compiler/testData/ir/irText/declarations/annotations/spreadOperatorInAnnotationArguments.fir.txt b/compiler/testData/ir/irText/declarations/annotations/spreadOperatorInAnnotationArguments.fir.txt index 27aa937cae3..912d147b3c9 100644 --- a/compiler/testData/ir/irText/declarations/annotations/spreadOperatorInAnnotationArguments.fir.txt +++ b/compiler/testData/ir/irText/declarations/annotations/spreadOperatorInAnnotationArguments.fir.txt @@ -1,12 +1,12 @@ FILE fqName: fileName:/spreadOperatorInAnnotationArguments.kt CLASS ANNOTATION_CLASS name:A modality:FINAL visibility:public superTypes:[kotlin.Annotation] $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.A - CONSTRUCTOR visibility:public <> (xs:kotlin.Array) returnType:.A [primary] - VALUE_PARAMETER name:xs index:0 type:kotlin.Array varargElementType:kotlin.String [vararg] + CONSTRUCTOR visibility:public <> (xs:kotlin.Array) returnType:.A [primary] + VALUE_PARAMETER name:xs index:0 type:kotlin.Array varargElementType:kotlin.String [vararg] PROPERTY name:xs visibility:public modality:FINAL [val] FIELD PROPERTY_BACKING_FIELD name:xs type:kotlin.Array visibility:private [final] EXPRESSION_BODY - GET_VAR 'xs: kotlin.Array [vararg] declared in .A.' type=kotlin.Array origin=INITIALIZE_PROPERTY_FROM_PARAMETER + GET_VAR 'xs: kotlin.Array [vararg] declared in .A.' type=kotlin.Array origin=INITIALIZE_PROPERTY_FROM_PARAMETER FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> ($this:.A) returnType:kotlin.Array correspondingProperty: PROPERTY name:xs visibility:public modality:FINAL [val] $this: VALUE_PARAMETER name: type:.A diff --git a/compiler/testData/ir/irText/declarations/annotations/varargsInAnnotationArguments.fir.txt b/compiler/testData/ir/irText/declarations/annotations/varargsInAnnotationArguments.fir.txt index 5968ba82c93..9a6a121a8c8 100644 --- a/compiler/testData/ir/irText/declarations/annotations/varargsInAnnotationArguments.fir.txt +++ b/compiler/testData/ir/irText/declarations/annotations/varargsInAnnotationArguments.fir.txt @@ -29,12 +29,12 @@ FILE fqName: fileName:/varargsInAnnotationArguments.kt $this: VALUE_PARAMETER name: type:kotlin.Any CLASS ANNOTATION_CLASS name:A2 modality:FINAL visibility:public superTypes:[kotlin.Annotation] $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.A2 - CONSTRUCTOR visibility:public <> (xs:kotlin.Array) returnType:.A2 [primary] - VALUE_PARAMETER name:xs index:0 type:kotlin.Array varargElementType:kotlin.String [vararg] + CONSTRUCTOR visibility:public <> (xs:kotlin.Array) returnType:.A2 [primary] + VALUE_PARAMETER name:xs index:0 type:kotlin.Array varargElementType:kotlin.String [vararg] PROPERTY name:xs visibility:public modality:FINAL [val] FIELD PROPERTY_BACKING_FIELD name:xs type:kotlin.Array visibility:private [final] EXPRESSION_BODY - GET_VAR 'xs: kotlin.Array [vararg] declared in .A2.' type=kotlin.Array origin=INITIALIZE_PROPERTY_FROM_PARAMETER + GET_VAR 'xs: kotlin.Array [vararg] declared in .A2.' type=kotlin.Array origin=INITIALIZE_PROPERTY_FROM_PARAMETER FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> ($this:.A2) returnType:kotlin.Array correspondingProperty: PROPERTY name:xs visibility:public modality:FINAL [val] $this: VALUE_PARAMETER name: type:.A2 @@ -57,12 +57,12 @@ FILE fqName: fileName:/varargsInAnnotationArguments.kt $this: VALUE_PARAMETER name: type:kotlin.Any CLASS ANNOTATION_CLASS name:AA modality:FINAL visibility:public superTypes:[kotlin.Annotation] $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.AA - CONSTRUCTOR visibility:public <> (xs:kotlin.Array<.A1>) returnType:.AA [primary] - VALUE_PARAMETER name:xs index:0 type:kotlin.Array<.A1> varargElementType:.A1 [vararg] + CONSTRUCTOR visibility:public <> (xs:kotlin.Array.A1>) returnType:.AA [primary] + VALUE_PARAMETER name:xs index:0 type:kotlin.Array.A1> varargElementType:.A1 [vararg] PROPERTY name:xs visibility:public modality:FINAL [val] FIELD PROPERTY_BACKING_FIELD name:xs type:kotlin.Array.A1> visibility:private [final] EXPRESSION_BODY - GET_VAR 'xs: kotlin.Array<.A1> [vararg] declared in .AA.' type=kotlin.Array<.A1> origin=INITIALIZE_PROPERTY_FROM_PARAMETER + GET_VAR 'xs: kotlin.Array.A1> [vararg] declared in .AA.' type=kotlin.Array.A1> origin=INITIALIZE_PROPERTY_FROM_PARAMETER FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> ($this:.AA) returnType:kotlin.Array.A1> correspondingProperty: PROPERTY name:xs visibility:public modality:FINAL [val] $this: VALUE_PARAMETER name: type:.AA diff --git a/compiler/testData/ir/irText/declarations/parameters/fun.fir.txt b/compiler/testData/ir/irText/declarations/parameters/fun.fir.txt deleted file mode 100644 index 289eadc6dd9..00000000000 --- a/compiler/testData/ir/irText/declarations/parameters/fun.fir.txt +++ /dev/null @@ -1,54 +0,0 @@ -FILE fqName: fileName:/fun.kt - FUN name:test1 visibility:public modality:FINAL (i:kotlin.Int, j:T of .test1) returnType:kotlin.Unit - TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?] - VALUE_PARAMETER name:i index:0 type:kotlin.Int - VALUE_PARAMETER name:j index:1 type:T of .test1 - BLOCK_BODY - FUN name:test2 visibility:public modality:FINAL <> (i:kotlin.Int, j:kotlin.String) returnType:kotlin.Unit - VALUE_PARAMETER name:i index:0 type:kotlin.Int - EXPRESSION_BODY - CONST Int type=kotlin.Int value=0 - VALUE_PARAMETER name:j index:1 type:kotlin.String - EXPRESSION_BODY - CONST String type=kotlin.String value="" - BLOCK_BODY - FUN name:test3 visibility:public modality:FINAL <> (args:kotlin.Array) returnType:kotlin.Unit - VALUE_PARAMETER name:args index:0 type:kotlin.Array 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: type:kotlin.String - VALUE_PARAMETER name:i index:0 type:kotlin.Int - VALUE_PARAMETER name:j index:1 type:kotlin.String - BLOCK_BODY - CLASS CLASS name:Host modality:FINAL visibility:public superTypes:[kotlin.Any] - $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Host - CONSTRUCTOR visibility:public <> () returnType:.Host [primary] - BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' - INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Host modality:FINAL visibility:public superTypes:[kotlin.Any]' - FUN name:testMembetExt1 visibility:public modality:FINAL <> ($this:.Host, $receiver:kotlin.String, i:kotlin.Int, j:kotlin.String) returnType:kotlin.Unit - $this: VALUE_PARAMETER name: type:.Host - $receiver: VALUE_PARAMETER name: type:kotlin.String - VALUE_PARAMETER name:i index:0 type:kotlin.Int - VALUE_PARAMETER name:j index:1 type:kotlin.String - BLOCK_BODY - FUN name:testMembetExt2 visibility:public modality:FINAL ($this:.Host, $receiver:kotlin.String, i:kotlin.Int, j:T of .Host.testMembetExt2) returnType:kotlin.Unit - TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?] - $this: VALUE_PARAMETER name: type:.Host - $receiver: VALUE_PARAMETER name: type:kotlin.String - VALUE_PARAMETER name:i index:0 type:kotlin.Int - VALUE_PARAMETER name:j index:1 type:T of .Host.testMembetExt2 - BLOCK_BODY - 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 - $this: VALUE_PARAMETER name: 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 [fake_override] - overridden: - public open fun hashCode (): kotlin.Int declared in kotlin.Any - $this: VALUE_PARAMETER name: type:kotlin.Any - FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override] - overridden: - public open fun toString (): kotlin.String declared in kotlin.Any - $this: VALUE_PARAMETER name: type:kotlin.Any diff --git a/compiler/testData/ir/irText/declarations/parameters/fun.kt b/compiler/testData/ir/irText/declarations/parameters/fun.kt index db33117f471..a1ff0b45393 100644 --- a/compiler/testData/ir/irText/declarations/parameters/fun.kt +++ b/compiler/testData/ir/irText/declarations/parameters/fun.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL fun test1(i: Int, j: T) {} fun test2(i: Int = 0, j: String = "") {} diff --git a/compiler/testData/ir/irText/declarations/parameters/localFun.fir.txt b/compiler/testData/ir/irText/declarations/parameters/localFun.fir.txt deleted file mode 100644 index ea719090719..00000000000 --- a/compiler/testData/ir/irText/declarations/parameters/localFun.fir.txt +++ /dev/null @@ -1,25 +0,0 @@ -FILE fqName: fileName:/localFun.kt - FUN name:outer visibility:public modality:FINAL () returnType:kotlin.Unit - TYPE_PARAMETER name:TT index:0 variance: superTypes:[kotlin.Any?] - BLOCK_BODY - FUN name:test1 visibility:local modality:FINAL (i:kotlin.Int, j:T of .outer.test1) returnType:kotlin.Unit - TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?] - VALUE_PARAMETER name:i index:0 type:kotlin.Int - VALUE_PARAMETER name:j index:1 type:T of .outer.test1 - BLOCK_BODY - FUN name:test2 visibility:local modality:FINAL <> (i:kotlin.Int, j:kotlin.String) returnType:kotlin.Unit - VALUE_PARAMETER name:i index:0 type:kotlin.Int - EXPRESSION_BODY - CONST Int type=kotlin.Int value=0 - VALUE_PARAMETER name:j index:1 type:kotlin.String - EXPRESSION_BODY - CONST String type=kotlin.String value="" - BLOCK_BODY - FUN name:test3 visibility:local modality:FINAL <> (args:kotlin.Array) returnType:kotlin.Unit - VALUE_PARAMETER name:args index:0 type:kotlin.Array varargElementType:kotlin.String [vararg] - BLOCK_BODY - FUN name:textExt1 visibility:local modality:FINAL <> ($receiver:kotlin.String, i:kotlin.Int, j:TT of .outer) returnType:kotlin.Unit - $receiver: VALUE_PARAMETER name: type:kotlin.String - VALUE_PARAMETER name:i index:0 type:kotlin.Int - VALUE_PARAMETER name:j index:1 type:TT of .outer - BLOCK_BODY diff --git a/compiler/testData/ir/irText/declarations/parameters/localFun.kt b/compiler/testData/ir/irText/declarations/parameters/localFun.kt index ede202e4db9..5b5bb305ebb 100644 --- a/compiler/testData/ir/irText/declarations/parameters/localFun.kt +++ b/compiler/testData/ir/irText/declarations/parameters/localFun.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL fun outer() { fun test1(i: Int, j: T) {} diff --git a/compiler/testData/ir/irText/expressions/callableReferences/withVarargViewedAsArray.fir.txt b/compiler/testData/ir/irText/expressions/callableReferences/withVarargViewedAsArray.fir.txt index 2d1bc68075f..d3804cf0e25 100644 --- a/compiler/testData/ir/irText/expressions/callableReferences/withVarargViewedAsArray.fir.txt +++ b/compiler/testData/ir/irText/expressions/callableReferences/withVarargViewedAsArray.fir.txt @@ -21,8 +21,8 @@ FILE fqName: fileName:/withVarargViewedAsArray.kt other: GET_VAR 'val arg: kotlin.Int [val] declared in .sum' type=kotlin.Int origin=null RETURN type=kotlin.Nothing from='public final fun sum (vararg args: kotlin.Int): kotlin.Int declared in ' GET_VAR 'var result: kotlin.Int [var] declared in .sum' type=kotlin.Int origin=null - FUN name:nsum visibility:public modality:FINAL <> (args:kotlin.Array) returnType:kotlin.Int - VALUE_PARAMETER name:args index:0 type:kotlin.Array varargElementType:kotlin.Number [vararg] + FUN name:nsum visibility:public modality:FINAL <> (args:kotlin.Array) returnType:kotlin.Int + VALUE_PARAMETER name:args index:0 type:kotlin.Array varargElementType:kotlin.Number [vararg] BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun nsum (vararg args: kotlin.Number): kotlin.Int declared in ' CALL 'public final fun sum (vararg args: kotlin.Int): kotlin.Int declared in ' type=kotlin.Int origin=null @@ -30,7 +30,7 @@ FILE fqName: fileName:/withVarargViewedAsArray.kt SPREAD_ELEMENT CONSTRUCTOR_CALL 'public constructor (size: kotlin.Int, init: kotlin.Function1) declared in kotlin.IntArray' type=kotlin.IntArray origin=null size: CALL 'public final fun (): kotlin.Int declared in kotlin.Array' type=kotlin.Int origin=null - $this: GET_VAR 'args: kotlin.Array [vararg] declared in .nsum' type=kotlin.Array origin=null + $this: GET_VAR 'args: kotlin.Array [vararg] declared in .nsum' type=kotlin.Array origin=null init: FUN_EXPR type=kotlin.Function1 origin=LAMBDA FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> (it:kotlin.Int) returnType:kotlin.Int VALUE_PARAMETER name:it index:0 type:kotlin.Int @@ -38,10 +38,10 @@ FILE fqName: fileName:/withVarargViewedAsArray.kt RETURN type=kotlin.Nothing from='local final fun (it: kotlin.Int): kotlin.Int declared in .nsum' 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 [vararg] declared in .nsum' type=kotlin.Array origin=null + $this: GET_VAR 'args: kotlin.Array [vararg] declared in .nsum' type=kotlin.Array origin=null index: GET_VAR 'it: kotlin.Int declared in .nsum.' type=kotlin.Int origin=null - FUN name:zap visibility:public modality:FINAL <> (b:kotlin.Array, k:kotlin.Int) returnType:kotlin.Unit - VALUE_PARAMETER name:b index:0 type:kotlin.Array varargElementType:kotlin.String [vararg] + FUN name:zap visibility:public modality:FINAL <> (b:kotlin.Array, k:kotlin.Int) returnType:kotlin.Unit + VALUE_PARAMETER name:b index:0 type:kotlin.Array varargElementType:kotlin.String [vararg] VALUE_PARAMETER name:k index:1 type:kotlin.Int EXPRESSION_BODY CONST Int type=kotlin.Int value=42 @@ -68,9 +68,9 @@ FILE fqName: fileName:/withVarargViewedAsArray.kt fn: FUNCTION_REFERENCE 'public final fun sum (vararg args: kotlin.Int): kotlin.Int declared in ' type=kotlin.reflect.KFunction1 origin=null reflectionTarget= FUN name:testArrayAsVararg visibility:public modality:FINAL <> () returnType:kotlin.Unit BLOCK_BODY - ERROR_CALL 'Unresolved reference: #' type=IrErrorType - FUNCTION_REFERENCE 'public final fun nsum (vararg args: kotlin.Number): kotlin.Int declared in ' type=kotlin.reflect.KFunction1, kotlin.Int> origin=null reflectionTarget= + CALL 'public final fun useArray (fn: kotlin.Function1, kotlin.Int>): kotlin.Unit declared in ' type=kotlin.Unit origin=null + fn: FUNCTION_REFERENCE 'public final fun nsum (vararg args: kotlin.Number): kotlin.Int declared in ' type=kotlin.reflect.KFunction1, kotlin.Int> origin=null reflectionTarget= FUN name:testArrayAndDefaults visibility:public modality:FINAL <> () returnType:kotlin.Unit BLOCK_BODY CALL 'public final fun useStringArray (fn: kotlin.Function1, kotlin.Unit>): kotlin.Unit declared in ' type=kotlin.Unit origin=null - fn: FUNCTION_REFERENCE 'public final fun zap (vararg b: kotlin.String, k: kotlin.Int): kotlin.Unit declared in ' type=kotlin.reflect.KFunction1, kotlin.Unit> origin=null reflectionTarget= + fn: FUNCTION_REFERENCE 'public final fun zap (vararg b: kotlin.String, k: kotlin.Int): kotlin.Unit declared in ' type=kotlin.reflect.KFunction1, kotlin.Unit> origin=null reflectionTarget= diff --git a/compiler/testData/ir/irText/expressions/funInterface/arrayAsVarargAfterSamArgument_fi.fir.txt b/compiler/testData/ir/irText/expressions/funInterface/arrayAsVarargAfterSamArgument_fi.fir.txt index 3f5f8220672..b9c915aaea2 100644 --- a/compiler/testData/ir/irText/expressions/funInterface/arrayAsVarargAfterSamArgument_fi.fir.txt +++ b/compiler/testData/ir/irText/expressions/funInterface/arrayAsVarargAfterSamArgument_fi.fir.txt @@ -16,14 +16,14 @@ FILE fqName: fileName:/arrayAsVarargAfterSamArgument_fi.kt overridden: public open fun toString (): kotlin.String declared in kotlin.Any $this: VALUE_PARAMETER name: type:kotlin.Any - FUN name:foo1 visibility:public modality:FINAL <> (r:.IRunnable, s:kotlin.Array) returnType:kotlin.Unit + FUN name:foo1 visibility:public modality:FINAL <> (r:.IRunnable, s:kotlin.Array) returnType:kotlin.Unit VALUE_PARAMETER name:r index:0 type:.IRunnable - VALUE_PARAMETER name:s index:1 type:kotlin.Array varargElementType:kotlin.String [vararg] + VALUE_PARAMETER name:s index:1 type:kotlin.Array varargElementType:kotlin.String [vararg] BLOCK_BODY - FUN name:foo2 visibility:public modality:FINAL <> (r1:.IRunnable, r2:.IRunnable, s:kotlin.Array) returnType:kotlin.Unit + FUN name:foo2 visibility:public modality:FINAL <> (r1:.IRunnable, r2:.IRunnable, s:kotlin.Array) returnType:kotlin.Unit VALUE_PARAMETER name:r1 index:0 type:.IRunnable VALUE_PARAMETER name:r2 index:1 type:.IRunnable - VALUE_PARAMETER name:s index:2 type:kotlin.Array varargElementType:kotlin.String [vararg] + VALUE_PARAMETER name:s index:2 type:kotlin.Array varargElementType:kotlin.String [vararg] BLOCK_BODY FUN name:test visibility:public modality:FINAL <> (fn:kotlin.Function0, r:.IRunnable, s:kotlin.String, arr:kotlin.Array) returnType:kotlin.Unit VALUE_PARAMETER name:fn index:0 type:kotlin.Function0 @@ -36,32 +36,32 @@ FILE fqName: fileName:/arrayAsVarargAfterSamArgument_fi.kt FUN LOCAL_FUNCTION_FOR_LAMBDA name: 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 - s: VARARG type=kotlin.Array varargElementType=kotlin.String + s: VARARG type=kotlin.Array varargElementType=kotlin.String GET_VAR 's: kotlin.String declared in .test' type=kotlin.String origin=null CALL 'public final fun foo1 (r: .IRunnable, vararg s: kotlin.String): kotlin.Unit declared in ' type=kotlin.Unit origin=null r: FUN_EXPR type=kotlin.Function0 origin=LAMBDA FUN LOCAL_FUNCTION_FOR_LAMBDA name: 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 - s: VARARG type=kotlin.Array varargElementType=kotlin.String + s: VARARG type=kotlin.Array varargElementType=kotlin.String SPREAD_ELEMENT GET_VAR 'arr: kotlin.Array declared in .test' type=kotlin.Array origin=null CALL 'public final fun foo1 (r: .IRunnable, vararg s: kotlin.String): kotlin.Unit declared in ' type=kotlin.Unit origin=null r: GET_VAR 'fn: kotlin.Function0 declared in .test' type=kotlin.Function0 origin=null - s: VARARG type=kotlin.Array varargElementType=kotlin.String + s: VARARG type=kotlin.Array varargElementType=kotlin.String GET_VAR 's: kotlin.String declared in .test' type=kotlin.String origin=null CALL 'public final fun foo1 (r: .IRunnable, vararg s: kotlin.String): kotlin.Unit declared in ' type=kotlin.Unit origin=null r: GET_VAR 'fn: kotlin.Function0 declared in .test' type=kotlin.Function0 origin=null - s: VARARG type=kotlin.Array varargElementType=kotlin.String + s: VARARG type=kotlin.Array varargElementType=kotlin.String SPREAD_ELEMENT GET_VAR 'arr: kotlin.Array declared in .test' type=kotlin.Array origin=null CALL 'public final fun foo1 (r: .IRunnable, vararg s: kotlin.String): kotlin.Unit declared in ' type=kotlin.Unit origin=null r: GET_VAR 'r: .IRunnable declared in .test' type=.IRunnable origin=null - s: VARARG type=kotlin.Array varargElementType=kotlin.String + s: VARARG type=kotlin.Array varargElementType=kotlin.String GET_VAR 's: kotlin.String declared in .test' type=kotlin.String origin=null CALL 'public final fun foo1 (r: .IRunnable, vararg s: kotlin.String): kotlin.Unit declared in ' type=kotlin.Unit origin=null r: GET_VAR 'r: .IRunnable declared in .test' type=.IRunnable origin=null - s: VARARG type=kotlin.Array varargElementType=kotlin.String + s: VARARG type=kotlin.Array varargElementType=kotlin.String SPREAD_ELEMENT GET_VAR 'arr: kotlin.Array declared in .test' type=kotlin.Array origin=null CALL 'public final fun foo2 (r1: .IRunnable, r2: .IRunnable, vararg s: kotlin.String): kotlin.Unit declared in ' type=kotlin.Unit origin=null @@ -73,7 +73,7 @@ FILE fqName: fileName:/arrayAsVarargAfterSamArgument_fi.kt FUN LOCAL_FUNCTION_FOR_LAMBDA name: 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 - s: VARARG type=kotlin.Array varargElementType=kotlin.String + s: VARARG type=kotlin.Array varargElementType=kotlin.String GET_VAR 's: kotlin.String declared in .test' type=kotlin.String origin=null CALL 'public final fun foo2 (r1: .IRunnable, r2: .IRunnable, vararg s: kotlin.String): kotlin.Unit declared in ' type=kotlin.Unit origin=null r1: FUN_EXPR type=kotlin.Function0 origin=LAMBDA @@ -84,7 +84,7 @@ FILE fqName: fileName:/arrayAsVarargAfterSamArgument_fi.kt FUN LOCAL_FUNCTION_FOR_LAMBDA name: 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 - s: VARARG type=kotlin.Array varargElementType=kotlin.String + s: VARARG type=kotlin.Array varargElementType=kotlin.String SPREAD_ELEMENT GET_VAR 'arr: kotlin.Array declared in .test' type=kotlin.Array origin=null CALL 'public final fun foo2 (r1: .IRunnable, r2: .IRunnable, vararg s: kotlin.String): kotlin.Unit declared in ' type=kotlin.Unit origin=null @@ -93,7 +93,7 @@ FILE fqName: fileName:/arrayAsVarargAfterSamArgument_fi.kt FUN LOCAL_FUNCTION_FOR_LAMBDA name: 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 - s: VARARG type=kotlin.Array varargElementType=kotlin.String + s: VARARG type=kotlin.Array varargElementType=kotlin.String GET_VAR 's: kotlin.String declared in .test' type=kotlin.String origin=null CALL 'public final fun foo2 (r1: .IRunnable, r2: .IRunnable, vararg s: kotlin.String): kotlin.Unit declared in ' type=kotlin.Unit origin=null r1: GET_VAR 'fn: kotlin.Function0 declared in .test' type=kotlin.Function0 origin=null @@ -101,7 +101,7 @@ FILE fqName: fileName:/arrayAsVarargAfterSamArgument_fi.kt FUN LOCAL_FUNCTION_FOR_LAMBDA name: 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 - s: VARARG type=kotlin.Array varargElementType=kotlin.String + s: VARARG type=kotlin.Array varargElementType=kotlin.String SPREAD_ELEMENT GET_VAR 'arr: kotlin.Array declared in .test' type=kotlin.Array origin=null CALL 'public final fun foo2 (r1: .IRunnable, r2: .IRunnable, vararg s: kotlin.String): kotlin.Unit declared in ' type=kotlin.Unit origin=null @@ -110,7 +110,7 @@ FILE fqName: fileName:/arrayAsVarargAfterSamArgument_fi.kt FUN LOCAL_FUNCTION_FOR_LAMBDA name: 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 - s: VARARG type=kotlin.Array varargElementType=kotlin.String + s: VARARG type=kotlin.Array varargElementType=kotlin.String GET_VAR 's: kotlin.String declared in .test' type=kotlin.String origin=null CALL 'public final fun foo2 (r1: .IRunnable, r2: .IRunnable, vararg s: kotlin.String): kotlin.Unit declared in ' type=kotlin.Unit origin=null r1: GET_VAR 'r: .IRunnable declared in .test' type=.IRunnable origin=null @@ -118,6 +118,6 @@ FILE fqName: fileName:/arrayAsVarargAfterSamArgument_fi.kt FUN LOCAL_FUNCTION_FOR_LAMBDA name: 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 - s: VARARG type=kotlin.Array varargElementType=kotlin.String + s: VARARG type=kotlin.Array varargElementType=kotlin.String SPREAD_ELEMENT GET_VAR 'arr: kotlin.Array declared in .test' type=kotlin.Array origin=null diff --git a/compiler/testData/ir/irText/expressions/funInterface/samConversionInVarargs.fir.txt b/compiler/testData/ir/irText/expressions/funInterface/samConversionInVarargs.fir.txt index 9c98efc9e6f..3be9a09fc99 100644 --- a/compiler/testData/ir/irText/expressions/funInterface/samConversionInVarargs.fir.txt +++ b/compiler/testData/ir/irText/expressions/funInterface/samConversionInVarargs.fir.txt @@ -17,13 +17,13 @@ FILE fqName: fileName:/samConversionInVarargs.kt overridden: public open fun toString (): kotlin.String declared in kotlin.Any $this: VALUE_PARAMETER name: type:kotlin.Any - FUN name:useVararg visibility:public modality:FINAL <> (foos:kotlin.Array<.IFoo>) returnType:kotlin.Unit - VALUE_PARAMETER name:foos index:0 type:kotlin.Array<.IFoo> varargElementType:.IFoo [vararg] + FUN name:useVararg visibility:public modality:FINAL <> (foos:kotlin.Array.IFoo>) returnType:kotlin.Unit + VALUE_PARAMETER name:foos index:0 type:kotlin.Array.IFoo> varargElementType:.IFoo [vararg] BLOCK_BODY FUN name:testLambda visibility:public modality:FINAL <> () returnType:kotlin.Unit BLOCK_BODY CALL 'public final fun useVararg (vararg foos: .IFoo): kotlin.Unit declared in ' type=kotlin.Unit origin=null - foos: VARARG type=kotlin.Array<.IFoo> varargElementType=.IFoo + foos: VARARG type=kotlin.Array.IFoo> varargElementType=.IFoo FUN_EXPR type=kotlin.Function1 origin=LAMBDA FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> (it:kotlin.Int) returnType:kotlin.Unit VALUE_PARAMETER name:it index:0 type:kotlin.Int @@ -32,7 +32,7 @@ FILE fqName: fileName:/samConversionInVarargs.kt FUN name:testSeveralLambdas visibility:public modality:FINAL <> () returnType:kotlin.Unit BLOCK_BODY CALL 'public final fun useVararg (vararg foos: .IFoo): kotlin.Unit declared in ' type=kotlin.Unit origin=null - foos: VARARG type=kotlin.Array<.IFoo> varargElementType=.IFoo + foos: VARARG type=kotlin.Array.IFoo> varargElementType=.IFoo FUN_EXPR type=kotlin.Function1 origin=LAMBDA FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> (it:kotlin.Int) returnType:kotlin.Unit VALUE_PARAMETER name:it index:0 type:kotlin.Int diff --git a/compiler/testData/ir/irText/expressions/signedToUnsignedConversions_test.fir.txt b/compiler/testData/ir/irText/expressions/signedToUnsignedConversions_test.fir.txt index 45fb43372de..059926fcdcc 100644 --- a/compiler/testData/ir/irText/expressions/signedToUnsignedConversions_test.fir.txt +++ b/compiler/testData/ir/irText/expressions/signedToUnsignedConversions_test.fir.txt @@ -77,8 +77,8 @@ FILE fqName: fileName:/signedToUnsignedConversions_test.kt FUN name:takeULong visibility:public modality:FINAL <> (u:kotlin.ULong) returnType:kotlin.Unit VALUE_PARAMETER name:u index:0 type:kotlin.ULong BLOCK_BODY - FUN name:takeUBytes visibility:public modality:FINAL <> (u:kotlin.Array) returnType:kotlin.Unit - VALUE_PARAMETER name:u index:0 type:kotlin.Array varargElementType:kotlin.UByte [vararg] + FUN name:takeUBytes visibility:public modality:FINAL <> (u:kotlin.Array) returnType:kotlin.Unit + VALUE_PARAMETER name:u index:0 type:kotlin.Array 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