diff --git a/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/generators/CallAndReferenceGenerator.kt b/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/generators/CallAndReferenceGenerator.kt index 3d23d4e524c..33689b07a5f 100644 --- a/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/generators/CallAndReferenceGenerator.kt +++ b/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/generators/CallAndReferenceGenerator.kt @@ -25,11 +25,15 @@ import org.jetbrains.kotlin.fir.resolve.substitution.ConeSubstitutor import org.jetbrains.kotlin.fir.resolve.substitution.ConeSubstitutorByMap import org.jetbrains.kotlin.fir.resolve.toSymbol import org.jetbrains.kotlin.fir.resolve.transformers.body.resolve.approximateDeclarationType +import org.jetbrains.kotlin.fir.resolve.typeAliasForConstructor import org.jetbrains.kotlin.fir.scopes.getDeclaredConstructors import org.jetbrains.kotlin.fir.scopes.unsubstitutedScope import org.jetbrains.kotlin.fir.symbols.FirBasedSymbol import org.jetbrains.kotlin.fir.symbols.impl.* import org.jetbrains.kotlin.fir.types.* +import org.jetbrains.kotlin.fir.types.builder.buildErrorTypeRef +import org.jetbrains.kotlin.fir.types.builder.buildResolvedTypeRef +import org.jetbrains.kotlin.fir.types.builder.buildTypeProjectionWithVariance import org.jetbrains.kotlin.fir.types.impl.ConeClassLikeTypeImpl import org.jetbrains.kotlin.ir.UNDEFINED_OFFSET import org.jetbrains.kotlin.ir.builders.declarations.UNDEFINED_PARAMETER_INDEX @@ -43,6 +47,7 @@ import org.jetbrains.kotlin.ir.util.isFunctionTypeOrSubtype import org.jetbrains.kotlin.ir.util.isInterface import org.jetbrains.kotlin.name.Name import org.jetbrains.kotlin.resolve.calls.NewCommonSuperTypeCalculator.commonSuperType +import org.jetbrains.kotlin.types.Variance import org.jetbrains.kotlin.util.OperatorNameConventions class CallAndReferenceGenerator( @@ -1054,12 +1059,51 @@ class CallAndReferenceGenerator( } internal fun IrExpression.applyTypeArguments(access: FirQualifiedAccessExpression): IrExpression { + val calleeReference = access.calleeReference + val originalTypeArguments = access.typeArguments + val callableFir = calleeReference.toResolvedCallableSymbol()?.fir + + // If we have a constructor call through a type alias, we can't apply the type arguments as is. + // The type arguments in FIR correspond to the original type arguments as passed to the type alias. + // However, the type alias can map the type arguments arbitrarily (change order, change count by mapping K,V -> Map or by + // having an unused argument). + // We need to map the type arguments using the expansion of the type alias. + + val typeArguments = (callableFir as? FirConstructor) + ?.typeAliasForConstructor + ?.let { originalTypeArguments.toExpandedTypeArguments(it) } + ?: originalTypeArguments + + return applyTypeArguments( - access.typeArguments, - (access.calleeReference.toResolvedCallableSymbol()?.fir as? FirTypeParametersOwner)?.typeParameters + typeArguments, + (callableFir as? FirTypeParametersOwner)?.typeParameters ) } + /** + * Applies the list of type arguments to the given type alias, expands it fully and returns the list of type arguments for the + * resulting type. + */ + private fun List.toExpandedTypeArguments(typeAliasSymbol: FirTypeAliasSymbol): List { + return typeAliasSymbol + .constructType(map { it.toConeTypeProjection() }.toTypedArray(), false) + .fullyExpandedType(session) + .typeArguments + .map { typeProjection -> + buildTypeProjectionWithVariance { + variance = when (typeProjection) { + is ConeKotlinTypeProjectionIn -> Variance.IN_VARIANCE + is ConeKotlinTypeProjectionOut -> Variance.OUT_VARIANCE + else -> Variance.INVARIANT + } + typeRef = (typeProjection as? ConeKotlinType)?.let { + buildResolvedTypeRef { type = it } + } ?: buildErrorTypeRef { } + } + } + } + private fun IrExpression.applyTypeArguments( typeArguments: List?, typeParameters: List?, diff --git a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/ir/FirLightTreeJvmIrTextTestGenerated.java b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/ir/FirLightTreeJvmIrTextTestGenerated.java index ae9b698a43f..e23463abbe5 100644 --- a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/ir/FirLightTreeJvmIrTextTestGenerated.java +++ b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/ir/FirLightTreeJvmIrTextTestGenerated.java @@ -2904,6 +2904,12 @@ public class FirLightTreeJvmIrTextTestGenerated extends AbstractFirLightTreeJvmI runTest("compiler/testData/ir/irText/firProblems/timesInBuilder.kt"); } + @Test + @TestMetadata("TypeAliasConstructorParameterMapping.kt") + public void testTypeAliasConstructorParameterMapping() throws Exception { + runTest("compiler/testData/ir/irText/firProblems/TypeAliasConstructorParameterMapping.kt"); + } + @Test @TestMetadata("TypeParameterBounds.kt") public void testTypeParameterBounds() throws Exception { diff --git a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/ir/FirPsiJvmIrTextTestGenerated.java b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/ir/FirPsiJvmIrTextTestGenerated.java index 7e0a84bf23b..4a4be6bddcc 100644 --- a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/ir/FirPsiJvmIrTextTestGenerated.java +++ b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/ir/FirPsiJvmIrTextTestGenerated.java @@ -2904,6 +2904,12 @@ public class FirPsiJvmIrTextTestGenerated extends AbstractFirPsiJvmIrTextTest { runTest("compiler/testData/ir/irText/firProblems/timesInBuilder.kt"); } + @Test + @TestMetadata("TypeAliasConstructorParameterMapping.kt") + public void testTypeAliasConstructorParameterMapping() throws Exception { + runTest("compiler/testData/ir/irText/firProblems/TypeAliasConstructorParameterMapping.kt"); + } + @Test @TestMetadata("TypeParameterBounds.kt") public void testTypeParameterBounds() throws Exception { diff --git a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/calls/ConstructorProcessing.kt b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/calls/ConstructorProcessing.kt index 20393eeb485..18695954801 100644 --- a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/calls/ConstructorProcessing.kt +++ b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/calls/ConstructorProcessing.kt @@ -13,10 +13,7 @@ import org.jetbrains.kotlin.fir.declarations.builder.buildConstructorCopy import org.jetbrains.kotlin.fir.declarations.builder.buildReceiverParameter import org.jetbrains.kotlin.fir.declarations.utils.isInner import org.jetbrains.kotlin.fir.languageVersionSettings -import org.jetbrains.kotlin.fir.resolve.BodyResolveComponents -import org.jetbrains.kotlin.fir.resolve.fullyExpandedType -import org.jetbrains.kotlin.fir.resolve.originalConstructorIfTypeAlias -import org.jetbrains.kotlin.fir.resolve.scope +import org.jetbrains.kotlin.fir.resolve.* import org.jetbrains.kotlin.fir.resolve.substitution.ConeSubstitutor import org.jetbrains.kotlin.fir.scopes.FakeOverrideTypeCalculator import org.jetbrains.kotlin.fir.scopes.FirScope @@ -264,6 +261,7 @@ private class TypeAliasConstructorsSubstitutingScope( }.apply { originalConstructorIfTypeAlias = originalConstructorSymbol.fir + typeAliasForConstructor = typeAliasSymbol }.symbol ) } diff --git a/compiler/fir/semantics/src/org/jetbrains/kotlin/fir/resolve/DeclarationUtils.kt b/compiler/fir/semantics/src/org/jetbrains/kotlin/fir/resolve/DeclarationUtils.kt index 4f485e4a2e1..a54bfc221bb 100644 --- a/compiler/fir/semantics/src/org/jetbrains/kotlin/fir/resolve/DeclarationUtils.kt +++ b/compiler/fir/semantics/src/org/jetbrains/kotlin/fir/resolve/DeclarationUtils.kt @@ -12,6 +12,7 @@ import org.jetbrains.kotlin.fir.declarations.utils.isLocal import org.jetbrains.kotlin.fir.resolve.providers.symbolProvider import org.jetbrains.kotlin.fir.symbols.FirBasedSymbol import org.jetbrains.kotlin.fir.symbols.impl.FirConstructorSymbol +import org.jetbrains.kotlin.fir.symbols.impl.FirTypeAliasSymbol import org.jetbrains.kotlin.fir.symbols.impl.FirTypeParameterSymbol import org.jetbrains.kotlin.fir.symbols.impl.LookupTagInternals import org.jetbrains.kotlin.fir.types.* @@ -88,6 +89,10 @@ var FirConstructor.originalConstructorIfTypeAlias: FirConstructor? by FirDeclara val FirConstructorSymbol.isTypeAliasedConstructor: Boolean get() = fir.originalConstructorIfTypeAlias != null +private object TypeAliasForConstructorKey : FirDeclarationDataKey() + +var FirConstructor.typeAliasForConstructor: FirTypeAliasSymbol? by FirDeclarationDataRegistry.data(TypeAliasForConstructorKey) + interface FirCodeFragmentContext { val towerDataContext: FirTowerDataContext val variables: Map, Set> @@ -95,4 +100,4 @@ interface FirCodeFragmentContext { private object CodeFragmentContextDataKey : FirDeclarationDataKey() -var FirCodeFragment.codeFragmentContext: FirCodeFragmentContext? by FirDeclarationDataRegistry.data(CodeFragmentContextDataKey) \ No newline at end of file +var FirCodeFragment.codeFragmentContext: FirCodeFragmentContext? by FirDeclarationDataRegistry.data(CodeFragmentContextDataKey) diff --git a/compiler/testData/ir/irText/expressions/specializedTypeAliasConstructorCall.fir.ir.txt b/compiler/testData/ir/irText/expressions/specializedTypeAliasConstructorCall.fir.ir.txt index d280e9c0431..0ea7e97cbf1 100644 --- a/compiler/testData/ir/irText/expressions/specializedTypeAliasConstructorCall.fir.ir.txt +++ b/compiler/testData/ir/irText/expressions/specializedTypeAliasConstructorCall.fir.ir.txt @@ -36,5 +36,5 @@ FILE fqName: fileName:/specializedTypeAliasConstructorCall.kt BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun test (): .Cell declared in ' CONSTRUCTOR_CALL 'public constructor (value: T of .Cell) declared in .Cell' type=.Cell origin=null - : + : kotlin.Int value: CONST Int type=kotlin.Int value=42 diff --git a/compiler/testData/ir/irText/expressions/specializedTypeAliasConstructorCall.fir.kt.txt b/compiler/testData/ir/irText/expressions/specializedTypeAliasConstructorCall.fir.kt.txt index 28be079f516..ca9d4279e1d 100644 --- a/compiler/testData/ir/irText/expressions/specializedTypeAliasConstructorCall.fir.kt.txt +++ b/compiler/testData/ir/irText/expressions/specializedTypeAliasConstructorCall.fir.kt.txt @@ -13,5 +13,5 @@ class Cell { } fun test(): Cell { - return Cell(value = 42) + return Cell(value = 42) } diff --git a/compiler/testData/ir/irText/firProblems/TypeAliasConstructorParameterMapping.fir.ir.txt b/compiler/testData/ir/irText/firProblems/TypeAliasConstructorParameterMapping.fir.ir.txt new file mode 100644 index 00000000000..403bcb3a427 --- /dev/null +++ b/compiler/testData/ir/irText/firProblems/TypeAliasConstructorParameterMapping.fir.ir.txt @@ -0,0 +1,148 @@ +FILE fqName: fileName:/TypeAliasConstructorParameterMapping.kt + TYPEALIAS name:OneToOne visibility:public expandedType:.Box1.OneToOne> + TYPE_PARAMETER name:A index:0 variance: superTypes:[kotlin.Any?] reified:false + TYPEALIAS name:OneToTwo visibility:public expandedType:.Box2.OneToTwo, A of .OneToTwo> + TYPE_PARAMETER name:A index:0 variance: superTypes:[kotlin.Any?] reified:false + TYPEALIAS name:TwoToTwo visibility:public expandedType:.Box2.TwoToTwo, B of .TwoToTwo> + TYPE_PARAMETER name:A index:0 variance: superTypes:[kotlin.Any?] reified:false + TYPE_PARAMETER name:B index:1 variance: superTypes:[kotlin.Any?] reified:false + TYPEALIAS name:TwoToTwoReversed visibility:public expandedType:.Box2.TwoToTwoReversed, A of .TwoToTwoReversed> + TYPE_PARAMETER name:A index:0 variance: superTypes:[kotlin.Any?] reified:false + TYPE_PARAMETER name:B index:1 variance: superTypes:[kotlin.Any?] reified:false + TYPEALIAS name:TwoToOne visibility:public expandedType:.Box1.TwoToOne> + TYPE_PARAMETER name:A index:0 variance: superTypes:[kotlin.Any?] reified:false + TYPE_PARAMETER name:B index:1 variance: superTypes:[kotlin.Any?] reified:false + TYPEALIAS name:OneToOneTransitive visibility:public expandedType:.Box1.OneToOneTransitive> + TYPE_PARAMETER name:A index:0 variance: superTypes:[kotlin.Any?] reified:false + TYPEALIAS name:TwoToTwoTransitive visibility:public expandedType:.Box2.TwoToTwoTransitive, A of .TwoToTwoTransitive> + TYPE_PARAMETER name:A index:0 variance: superTypes:[kotlin.Any?] reified:false + TYPE_PARAMETER name:B index:1 variance: superTypes:[kotlin.Any?] reified:false + TYPEALIAS name:TwoToTwoTransitive2 visibility:public expandedType:.Box2.TwoToTwoTransitive2, B of .TwoToTwoTransitive2> + TYPE_PARAMETER name:A index:0 variance: superTypes:[kotlin.Any?] reified:false + TYPE_PARAMETER name:B index:1 variance: superTypes:[kotlin.Any?] reified:false + CLASS CLASS name:Box1 modality:FINAL visibility:public superTypes:[kotlin.Any] + $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Box1.Box1> + TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?] reified:false + CONSTRUCTOR visibility:public <> () returnType:.Box1.Box1> [primary] + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'public constructor () declared in kotlin.Any' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Box1 modality:FINAL visibility:public superTypes:[kotlin.Any]' + FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] + overridden: + public open fun equals (other: kotlin.Any?): kotlin.Boolean 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 + CLASS CLASS name:Box2 modality:FINAL visibility:public superTypes:[kotlin.Any] + $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Box2.Box2, R of .Box2> + TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?] reified:false + TYPE_PARAMETER name:R index:1 variance: superTypes:[kotlin.Any?] reified:false + CONSTRUCTOR visibility:public <> () returnType:.Box2.Box2, R of .Box2> [primary] + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'public constructor () declared in kotlin.Any' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Box2 modality:FINAL visibility:public superTypes:[kotlin.Any]' + FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] + overridden: + public open fun equals (other: kotlin.Any?): kotlin.Boolean 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 + PROPERTY name:test1 visibility:public modality:FINAL [val] + FIELD PROPERTY_BACKING_FIELD name:test1 type:.Box1 visibility:private [final,static] + EXPRESSION_BODY + CONSTRUCTOR_CALL 'public constructor () declared in .Box1' type=.Box1 origin=null + : kotlin.Int + FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:.Box1 + correspondingProperty: PROPERTY name:test1 visibility:public modality:FINAL [val] + BLOCK_BODY + RETURN type=kotlin.Nothing from='public final fun (): .Box1 declared in ' + GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:test1 type:.Box1 visibility:private [final,static]' type=.Box1 origin=null + PROPERTY name:test2 visibility:public modality:FINAL [val] + FIELD PROPERTY_BACKING_FIELD name:test2 type:.Box2 visibility:private [final,static] + EXPRESSION_BODY + CONSTRUCTOR_CALL 'public constructor () declared in .Box2' type=.Box2 origin=null + : kotlin.Int + : kotlin.Int + FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:.Box2 + correspondingProperty: PROPERTY name:test2 visibility:public modality:FINAL [val] + BLOCK_BODY + RETURN type=kotlin.Nothing from='public final fun (): .Box2 declared in ' + GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:test2 type:.Box2 visibility:private [final,static]' type=.Box2 origin=null + PROPERTY name:test3 visibility:public modality:FINAL [val] + FIELD PROPERTY_BACKING_FIELD name:test3 type:.Box2 visibility:private [final,static] + EXPRESSION_BODY + CONSTRUCTOR_CALL 'public constructor () declared in .Box2' type=.Box2 origin=null + : kotlin.Int + : kotlin.String + FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:.Box2 + correspondingProperty: PROPERTY name:test3 visibility:public modality:FINAL [val] + BLOCK_BODY + RETURN type=kotlin.Nothing from='public final fun (): .Box2 declared in ' + GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:test3 type:.Box2 visibility:private [final,static]' type=.Box2 origin=null + PROPERTY name:test4 visibility:public modality:FINAL [val] + FIELD PROPERTY_BACKING_FIELD name:test4 type:.Box2 visibility:private [final,static] + EXPRESSION_BODY + CONSTRUCTOR_CALL 'public constructor () declared in .Box2' type=.Box2 origin=null + : kotlin.String + : kotlin.Int + FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:.Box2 + correspondingProperty: PROPERTY name:test4 visibility:public modality:FINAL [val] + BLOCK_BODY + RETURN type=kotlin.Nothing from='public final fun (): .Box2 declared in ' + GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:test4 type:.Box2 visibility:private [final,static]' type=.Box2 origin=null + PROPERTY name:test5 visibility:public modality:FINAL [val] + FIELD PROPERTY_BACKING_FIELD name:test5 type:.Box1 visibility:private [final,static] + EXPRESSION_BODY + CONSTRUCTOR_CALL 'public constructor () declared in .Box1' type=.Box1 origin=null + : kotlin.Int + FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:.Box1 + correspondingProperty: PROPERTY name:test5 visibility:public modality:FINAL [val] + BLOCK_BODY + RETURN type=kotlin.Nothing from='public final fun (): .Box1 declared in ' + GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:test5 type:.Box1 visibility:private [final,static]' type=.Box1 origin=null + PROPERTY name:test6 visibility:public modality:FINAL [val] + FIELD PROPERTY_BACKING_FIELD name:test6 type:.Box1 visibility:private [final,static] + EXPRESSION_BODY + CONSTRUCTOR_CALL 'public constructor () declared in .Box1' type=.Box1 origin=null + : kotlin.Int + FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:.Box1 + correspondingProperty: PROPERTY name:test6 visibility:public modality:FINAL [val] + BLOCK_BODY + RETURN type=kotlin.Nothing from='public final fun (): .Box1 declared in ' + GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:test6 type:.Box1 visibility:private [final,static]' type=.Box1 origin=null + PROPERTY name:test7 visibility:public modality:FINAL [val] + FIELD PROPERTY_BACKING_FIELD name:test7 type:.Box2 visibility:private [final,static] + EXPRESSION_BODY + CONSTRUCTOR_CALL 'public constructor () declared in .Box2' type=.Box2 origin=null + : kotlin.Int + : kotlin.Int + FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:.Box2 + correspondingProperty: PROPERTY name:test7 visibility:public modality:FINAL [val] + BLOCK_BODY + RETURN type=kotlin.Nothing from='public final fun (): .Box2 declared in ' + GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:test7 type:.Box2 visibility:private [final,static]' type=.Box2 origin=null + PROPERTY name:test8 visibility:public modality:FINAL [val] + FIELD PROPERTY_BACKING_FIELD name:test8 type:.Box2 visibility:private [final,static] + EXPRESSION_BODY + CONSTRUCTOR_CALL 'public constructor () declared in .Box2' type=.Box2 origin=null + : kotlin.String + : kotlin.String + FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:.Box2 + correspondingProperty: PROPERTY name:test8 visibility:public modality:FINAL [val] + BLOCK_BODY + RETURN type=kotlin.Nothing from='public final fun (): .Box2 declared in ' + GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:test8 type:.Box2 visibility:private [final,static]' type=.Box2 origin=null diff --git a/compiler/testData/ir/irText/firProblems/TypeAliasConstructorParameterMapping.fir.kt.txt b/compiler/testData/ir/irText/firProblems/TypeAliasConstructorParameterMapping.fir.kt.txt new file mode 100644 index 00000000000..0448040716e --- /dev/null +++ b/compiler/testData/ir/irText/firProblems/TypeAliasConstructorParameterMapping.fir.kt.txt @@ -0,0 +1,57 @@ +typealias OneToOne = Box1 +typealias OneToTwo = Box2 +typealias TwoToTwo = Box2 +typealias TwoToTwoReversed = Box2 +typealias TwoToOne = Box1 +typealias OneToOneTransitive = Box1 +typealias TwoToTwoTransitive = Box2 +typealias TwoToTwoTransitive2 = Box2 +class Box1 { + constructor() /* primary */ { + super/*Any*/() + /* () */ + + } + +} + +class Box2 { + constructor() /* primary */ { + super/*Any*/() + /* () */ + + } + +} + +val test1: Box1 + field = Box1() + get + +val test2: Box2 + field = Box2() + get + +val test3: Box2 + field = Box2() + get + +val test4: Box2 + field = Box2() + get + +val test5: Box1 + field = Box1() + get + +val test6: Box1 + field = Box1() + get + +val test7: Box2 + field = Box2() + get + +val test8: Box2 + field = Box2() + get diff --git a/compiler/testData/ir/irText/firProblems/TypeAliasConstructorParameterMapping.ir.txt b/compiler/testData/ir/irText/firProblems/TypeAliasConstructorParameterMapping.ir.txt new file mode 100644 index 00000000000..d3dc177e984 --- /dev/null +++ b/compiler/testData/ir/irText/firProblems/TypeAliasConstructorParameterMapping.ir.txt @@ -0,0 +1,148 @@ +FILE fqName: fileName:/TypeAliasConstructorParameterMapping.kt + CLASS CLASS name:Box1 modality:FINAL visibility:public superTypes:[kotlin.Any] + $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Box1.Box1> + TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?] reified:false + CONSTRUCTOR visibility:public <> () returnType:.Box1.Box1> [primary] + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'public constructor () declared in kotlin.Any' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Box1 modality:FINAL visibility:public superTypes:[kotlin.Any]' + FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] + overridden: + public open fun equals (other: kotlin.Any?): kotlin.Boolean 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 + CLASS CLASS name:Box2 modality:FINAL visibility:public superTypes:[kotlin.Any] + $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Box2.Box2, R of .Box2> + TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?] reified:false + TYPE_PARAMETER name:R index:1 variance: superTypes:[kotlin.Any?] reified:false + CONSTRUCTOR visibility:public <> () returnType:.Box2.Box2, R of .Box2> [primary] + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'public constructor () declared in kotlin.Any' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Box2 modality:FINAL visibility:public superTypes:[kotlin.Any]' + FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] + overridden: + public open fun equals (other: kotlin.Any?): kotlin.Boolean 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 + TYPEALIAS name:OneToOne visibility:public expandedType:.Box1.OneToOne> + TYPE_PARAMETER name:A index:0 variance: superTypes:[kotlin.Any?] reified:false + TYPEALIAS name:OneToTwo visibility:public expandedType:.Box2.OneToTwo, A of .OneToTwo> + TYPE_PARAMETER name:A index:0 variance: superTypes:[kotlin.Any?] reified:false + TYPEALIAS name:TwoToTwo visibility:public expandedType:.Box2.TwoToTwo, B of .TwoToTwo> + TYPE_PARAMETER name:A index:0 variance: superTypes:[kotlin.Any?] reified:false + TYPE_PARAMETER name:B index:1 variance: superTypes:[kotlin.Any?] reified:false + TYPEALIAS name:TwoToTwoReversed visibility:public expandedType:.Box2.TwoToTwoReversed, A of .TwoToTwoReversed> + TYPE_PARAMETER name:A index:0 variance: superTypes:[kotlin.Any?] reified:false + TYPE_PARAMETER name:B index:1 variance: superTypes:[kotlin.Any?] reified:false + TYPEALIAS name:TwoToOne visibility:public expandedType:.Box1.TwoToOne> + TYPE_PARAMETER name:A index:0 variance: superTypes:[kotlin.Any?] reified:false + TYPE_PARAMETER name:B index:1 variance: superTypes:[kotlin.Any?] reified:false + TYPEALIAS name:OneToOneTransitive visibility:public expandedType:.Box1.OneToOneTransitive> + TYPE_PARAMETER name:A index:0 variance: superTypes:[kotlin.Any?] reified:false + TYPEALIAS name:TwoToTwoTransitive visibility:public expandedType:.Box2.TwoToTwoTransitive, A of .TwoToTwoTransitive> + TYPE_PARAMETER name:A index:0 variance: superTypes:[kotlin.Any?] reified:false + TYPE_PARAMETER name:B index:1 variance: superTypes:[kotlin.Any?] reified:false + TYPEALIAS name:TwoToTwoTransitive2 visibility:public expandedType:.Box2.TwoToTwoTransitive2, B of .TwoToTwoTransitive2> + TYPE_PARAMETER name:A index:0 variance: superTypes:[kotlin.Any?] reified:false + TYPE_PARAMETER name:B index:1 variance: superTypes:[kotlin.Any?] reified:false + PROPERTY name:test1 visibility:public modality:FINAL [val] + FIELD PROPERTY_BACKING_FIELD name:test1 type:.Box1{ .OneToOne } visibility:private [final,static] + EXPRESSION_BODY + CONSTRUCTOR_CALL 'public constructor () declared in .Box1' type=.Box1 origin=null + : kotlin.Int + FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:.Box1{ .OneToOne } + correspondingProperty: PROPERTY name:test1 visibility:public modality:FINAL [val] + BLOCK_BODY + RETURN type=kotlin.Nothing from='public final fun (): .Box1{ .OneToOne } declared in ' + GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:test1 type:.Box1{ .OneToOne } visibility:private [final,static]' type=.Box1{ .OneToOne } origin=null + PROPERTY name:test2 visibility:public modality:FINAL [val] + FIELD PROPERTY_BACKING_FIELD name:test2 type:.Box2{ .OneToTwo } visibility:private [final,static] + EXPRESSION_BODY + CONSTRUCTOR_CALL 'public constructor () declared in .Box2' type=.Box2 origin=null + : kotlin.Int + : kotlin.Int + FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:.Box2{ .OneToTwo } + correspondingProperty: PROPERTY name:test2 visibility:public modality:FINAL [val] + BLOCK_BODY + RETURN type=kotlin.Nothing from='public final fun (): .Box2{ .OneToTwo } declared in ' + GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:test2 type:.Box2{ .OneToTwo } visibility:private [final,static]' type=.Box2{ .OneToTwo } origin=null + PROPERTY name:test3 visibility:public modality:FINAL [val] + FIELD PROPERTY_BACKING_FIELD name:test3 type:.Box2{ .TwoToTwo } visibility:private [final,static] + EXPRESSION_BODY + CONSTRUCTOR_CALL 'public constructor () declared in .Box2' type=.Box2 origin=null + : kotlin.Int + : kotlin.String + FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:.Box2{ .TwoToTwo } + correspondingProperty: PROPERTY name:test3 visibility:public modality:FINAL [val] + BLOCK_BODY + RETURN type=kotlin.Nothing from='public final fun (): .Box2{ .TwoToTwo } declared in ' + GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:test3 type:.Box2{ .TwoToTwo } visibility:private [final,static]' type=.Box2{ .TwoToTwo } origin=null + PROPERTY name:test4 visibility:public modality:FINAL [val] + FIELD PROPERTY_BACKING_FIELD name:test4 type:.Box2{ .TwoToTwoReversed } visibility:private [final,static] + EXPRESSION_BODY + CONSTRUCTOR_CALL 'public constructor () declared in .Box2' type=.Box2 origin=null + : kotlin.String + : kotlin.Int + FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:.Box2{ .TwoToTwoReversed } + correspondingProperty: PROPERTY name:test4 visibility:public modality:FINAL [val] + BLOCK_BODY + RETURN type=kotlin.Nothing from='public final fun (): .Box2{ .TwoToTwoReversed } declared in ' + GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:test4 type:.Box2{ .TwoToTwoReversed } visibility:private [final,static]' type=.Box2{ .TwoToTwoReversed } origin=null + PROPERTY name:test5 visibility:public modality:FINAL [val] + FIELD PROPERTY_BACKING_FIELD name:test5 type:.Box1{ .TwoToOne } visibility:private [final,static] + EXPRESSION_BODY + CONSTRUCTOR_CALL 'public constructor () declared in .Box1' type=.Box1 origin=null + : kotlin.Int + FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:.Box1{ .TwoToOne } + correspondingProperty: PROPERTY name:test5 visibility:public modality:FINAL [val] + BLOCK_BODY + RETURN type=kotlin.Nothing from='public final fun (): .Box1{ .TwoToOne } declared in ' + GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:test5 type:.Box1{ .TwoToOne } visibility:private [final,static]' type=.Box1{ .TwoToOne } origin=null + PROPERTY name:test6 visibility:public modality:FINAL [val] + FIELD PROPERTY_BACKING_FIELD name:test6 type:.Box1{ .OneToOneTransitive } visibility:private [final,static] + EXPRESSION_BODY + CONSTRUCTOR_CALL 'public constructor () declared in .Box1' type=.Box1 origin=null + : kotlin.Int + FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:.Box1{ .OneToOneTransitive } + correspondingProperty: PROPERTY name:test6 visibility:public modality:FINAL [val] + BLOCK_BODY + RETURN type=kotlin.Nothing from='public final fun (): .Box1{ .OneToOneTransitive } declared in ' + GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:test6 type:.Box1{ .OneToOneTransitive } visibility:private [final,static]' type=.Box1{ .OneToOneTransitive } origin=null + PROPERTY name:test7 visibility:public modality:FINAL [val] + FIELD PROPERTY_BACKING_FIELD name:test7 type:.Box2{ .TwoToTwoTransitive } visibility:private [final,static] + EXPRESSION_BODY + CONSTRUCTOR_CALL 'public constructor () declared in .Box2' type=.Box2 origin=null + : kotlin.Int + : kotlin.Int + FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:.Box2{ .TwoToTwoTransitive } + correspondingProperty: PROPERTY name:test7 visibility:public modality:FINAL [val] + BLOCK_BODY + RETURN type=kotlin.Nothing from='public final fun (): .Box2{ .TwoToTwoTransitive } declared in ' + GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:test7 type:.Box2{ .TwoToTwoTransitive } visibility:private [final,static]' type=.Box2{ .TwoToTwoTransitive } origin=null + PROPERTY name:test8 visibility:public modality:FINAL [val] + FIELD PROPERTY_BACKING_FIELD name:test8 type:.Box2{ .TwoToTwoTransitive2 } visibility:private [final,static] + EXPRESSION_BODY + CONSTRUCTOR_CALL 'public constructor () declared in .Box2' type=.Box2 origin=null + : kotlin.String + : kotlin.String + FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:.Box2{ .TwoToTwoTransitive2 } + correspondingProperty: PROPERTY name:test8 visibility:public modality:FINAL [val] + BLOCK_BODY + RETURN type=kotlin.Nothing from='public final fun (): .Box2{ .TwoToTwoTransitive2 } declared in ' + GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:test8 type:.Box2{ .TwoToTwoTransitive2 } visibility:private [final,static]' type=.Box2{ .TwoToTwoTransitive2 } origin=null diff --git a/compiler/testData/ir/irText/firProblems/TypeAliasConstructorParameterMapping.kt b/compiler/testData/ir/irText/firProblems/TypeAliasConstructorParameterMapping.kt new file mode 100644 index 00000000000..f180d6a7b6f --- /dev/null +++ b/compiler/testData/ir/irText/firProblems/TypeAliasConstructorParameterMapping.kt @@ -0,0 +1,23 @@ +// WITH_STDLIB +// TARGET_BACKEND: JVM_IR + +class Box1() +class Box2() + +typealias OneToOne = Box1 +typealias OneToTwo = Box2 +typealias TwoToTwo = Box2 +typealias TwoToTwoReversed = Box2 +typealias TwoToOne = Box1 +typealias OneToOneTransitive = TwoToOne +typealias TwoToTwoTransitive = OneToTwo +typealias TwoToTwoTransitive2 = OneToTwo + +val test1 = OneToOne() +val test2 = OneToTwo() +val test3 = TwoToTwo() +val test4 = TwoToTwoReversed() +val test5 = TwoToOne() +val test6 = OneToOneTransitive() +val test7 = TwoToTwoTransitive() +val test8 = TwoToTwoTransitive2() diff --git a/compiler/testData/ir/irText/firProblems/TypeAliasConstructorParameterMapping.kt.txt b/compiler/testData/ir/irText/firProblems/TypeAliasConstructorParameterMapping.kt.txt new file mode 100644 index 00000000000..03fd82b3568 --- /dev/null +++ b/compiler/testData/ir/irText/firProblems/TypeAliasConstructorParameterMapping.kt.txt @@ -0,0 +1,57 @@ +class Box1 { + constructor() /* primary */ { + super/*Any*/() + /* () */ + + } + +} + +class Box2 { + constructor() /* primary */ { + super/*Any*/() + /* () */ + + } + +} + +typealias OneToOne = Box1 +typealias OneToTwo = Box2 +typealias TwoToTwo = Box2 +typealias TwoToTwoReversed = Box2 +typealias TwoToOne = Box1 +typealias OneToOneTransitive = Box1 +typealias TwoToTwoTransitive = Box2 +typealias TwoToTwoTransitive2 = Box2 +val test1: Box1 + field = Box1() + get + +val test2: Box2 + field = Box2() + get + +val test3: Box2 + field = Box2() + get + +val test4: Box2 + field = Box2() + get + +val test5: Box1 + field = Box1() + get + +val test6: Box1 + field = Box1() + get + +val test7: Box2 + field = Box2() + get + +val test8: Box2 + field = Box2() + get diff --git a/compiler/testData/ir/irText/firProblems/TypeAliasConstructorParameterMapping.sig.kt.txt b/compiler/testData/ir/irText/firProblems/TypeAliasConstructorParameterMapping.sig.kt.txt new file mode 100644 index 00000000000..c4fe84061d9 --- /dev/null +++ b/compiler/testData/ir/irText/firProblems/TypeAliasConstructorParameterMapping.sig.kt.txt @@ -0,0 +1,144 @@ +// CHECK: +// Mangled name: {}test1 +// Public signature: /test1|6005685442305498193[0] +// Public signature debug description: {}test1 +val test1: Box1 + // CHECK JVM_IR: + // Mangled name: #(){}Box1 + // Public signature: /test1.|-5747887246888681086[0] + // Public signature debug description: (){}Box1 + get + +// CHECK: +// Mangled name: {}test2 +// Public signature: /test2|2517758057000911509[0] +// Public signature debug description: {}test2 +val test2: Box2 + // CHECK JVM_IR: + // Mangled name: #(){}Box2 + // Public signature: /test2.|-8093967936013127700[0] + // Public signature debug description: (){}Box2 + get + +// CHECK: +// Mangled name: {}test3 +// Public signature: /test3|7677556066983021166[0] +// Public signature debug description: {}test3 +val test3: Box2 + // CHECK JVM_IR: + // Mangled name: #(){}Box2 + // Public signature: /test3.|7330124542622364329[0] + // Public signature debug description: (){}Box2 + get + +// CHECK: +// Mangled name: {}test4 +// Public signature: /test4|-9115637610245762085[0] +// Public signature debug description: {}test4 +val test4: Box2 + // CHECK JVM_IR: + // Mangled name: #(){}Box2 + // Public signature: /test4.|8274992131610048705[0] + // Public signature debug description: (){}Box2 + get + +// CHECK: +// Mangled name: {}test5 +// Public signature: /test5|4734809624271551895[0] +// Public signature debug description: {}test5 +val test5: Box1 + // CHECK JVM_IR: + // Mangled name: #(){}Box1 + // Public signature: /test5.|-4135615187810921358[0] + // Public signature debug description: (){}Box1 + get + +// CHECK: +// Mangled name: {}test6 +// Public signature: /test6|-2606527149405855403[0] +// Public signature debug description: {}test6 +val test6: Box1 + // CHECK JVM_IR: + // Mangled name: #(){}Box1 + // Public signature: /test6.|4872700098972426138[0] + // Public signature debug description: (){}Box1 + get + +// CHECK: +// Mangled name: {}test7 +// Public signature: /test7|1362036650170262859[0] +// Public signature debug description: {}test7 +val test7: Box2 + // CHECK JVM_IR: + // Mangled name: #(){}Box2 + // Public signature: /test7.|-3283424550561018351[0] + // Public signature debug description: (){}Box2 + get + +// CHECK: +// Mangled name: {}test8 +// Public signature: /test8|5640428216506241852[0] +// Public signature debug description: {}test8 +val test8: Box2 + // CHECK JVM_IR: + // Mangled name: #(){}Box2 + // Public signature: /test8.|3315637717268921363[0] + // Public signature debug description: (){}Box2 + get + +// CHECK: +// Mangled name: Box1 +// Public signature: /Box1|null[0] +class Box1 { + // CHECK: + // Mangled name: Box1#(){} + // Public signature: /Box1.|-5645683436151566731[0] + // Public signature debug description: (){} + constructor() /* primary */ + +} + +// CHECK: +// Mangled name: Box2 +// Public signature: /Box2|null[0] +class Box2 { + // CHECK: + // Mangled name: Box2#(){} + // Public signature: /Box2.|-5645683436151566731[0] + // Public signature debug description: (){} + constructor() /* primary */ + +} + +// CHECK: +// Mangled name: OneToOne +// Public signature: /OneToOne|null[0] +typealias OneToOne = Box1 +// CHECK: +// Mangled name: OneToOneTransitive +// Public signature: /OneToOneTransitive|null[0] +typealias OneToOneTransitive = Box1 +// CHECK: +// Mangled name: OneToTwo +// Public signature: /OneToTwo|null[0] +typealias OneToTwo = Box2 +// CHECK: +// Mangled name: TwoToOne +// Public signature: /TwoToOne|null[0] +typealias TwoToOne = Box1 +// CHECK: +// Mangled name: TwoToTwo +// Public signature: /TwoToTwo|null[0] +typealias TwoToTwo = Box2 +// CHECK: +// Mangled name: TwoToTwoReversed +// Public signature: /TwoToTwoReversed|null[0] +typealias TwoToTwoReversed = Box2 +// CHECK: +// Mangled name: TwoToTwoTransitive +// Public signature: /TwoToTwoTransitive|null[0] +typealias TwoToTwoTransitive = Box2 +// CHECK: +// Mangled name: TwoToTwoTransitive2 +// Public signature: /TwoToTwoTransitive2|null[0] +typealias TwoToTwoTransitive2 = Box2 diff --git a/compiler/testData/ir/irText/regressions/typeAliasCtorForGenericClass.fir.ir.txt b/compiler/testData/ir/irText/regressions/typeAliasCtorForGenericClass.fir.ir.txt index c4422921521..fac022ef452 100644 --- a/compiler/testData/ir/irText/regressions/typeAliasCtorForGenericClass.fir.ir.txt +++ b/compiler/testData/ir/irText/regressions/typeAliasCtorForGenericClass.fir.ir.txt @@ -43,5 +43,5 @@ FILE fqName: fileName:/typeAliasCtorForGenericClass.kt q: CONST Int type=kotlin.Int value=2 VAR name:b2 type:.A<.A> [val] CONSTRUCTOR_CALL 'public constructor (q: Q of .A) declared in .A' type=.A<.A> origin=null - : kotlin.Int + : .A q: GET_VAR 'val b: .A declared in .bar' type=.A origin=null diff --git a/compiler/testData/ir/irText/regressions/typeAliasCtorForGenericClass.fir.kt.txt b/compiler/testData/ir/irText/regressions/typeAliasCtorForGenericClass.fir.kt.txt index 4a917e950bc..0ca99317a3c 100644 --- a/compiler/testData/ir/irText/regressions/typeAliasCtorForGenericClass.fir.kt.txt +++ b/compiler/testData/ir/irText/regressions/typeAliasCtorForGenericClass.fir.kt.txt @@ -15,5 +15,5 @@ class A { fun bar() { val b: A = A(q = 2) - val b2: A> = A(q = b) + val b2: A> = A>(q = b) } diff --git a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/ir/ClassicJvmIrTextTestGenerated.java b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/ir/ClassicJvmIrTextTestGenerated.java index de711455e51..9d9a3515a87 100644 --- a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/ir/ClassicJvmIrTextTestGenerated.java +++ b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/ir/ClassicJvmIrTextTestGenerated.java @@ -2904,6 +2904,12 @@ public class ClassicJvmIrTextTestGenerated extends AbstractClassicJvmIrTextTest runTest("compiler/testData/ir/irText/firProblems/timesInBuilder.kt"); } + @Test + @TestMetadata("TypeAliasConstructorParameterMapping.kt") + public void testTypeAliasConstructorParameterMapping() throws Exception { + runTest("compiler/testData/ir/irText/firProblems/TypeAliasConstructorParameterMapping.kt"); + } + @Test @TestMetadata("TypeParameterBounds.kt") public void testTypeParameterBounds() throws Exception {