diff --git a/compiler/fir/analysis-tests/testData/resolveWithStdlib/noneWithForEach.fir.txt b/compiler/fir/analysis-tests/testData/resolveWithStdlib/noneWithForEach.fir.txt index c100ad8a655..d8902a90d4b 100644 --- a/compiler/fir/analysis-tests/testData/resolveWithStdlib/noneWithForEach.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolveWithStdlib/noneWithForEach.fir.txt @@ -5,7 +5,7 @@ FILE: noneWithForEach.kt } public final fun foo(conflicting: R|kotlin/collections/List|): R|kotlin/Unit| { - lval filtered: R|java/util/ArrayList| = R|kotlin/collections/arrayListOf|() + lval filtered: R|kotlin/collections/ArrayList| = R|kotlin/collections/arrayListOf|() R|/conflicting|.R|kotlin/collections/groupBy|( = groupBy@fun (it: R|Diagnostic|): R|kotlin/String| { ^ R|/it|.R|/Diagnostic.name| } diff --git a/compiler/fir/analysis-tests/testData/resolveWithStdlib/noneWithForEach.kt b/compiler/fir/analysis-tests/testData/resolveWithStdlib/noneWithForEach.kt index 7174491782a..da161893516 100644 --- a/compiler/fir/analysis-tests/testData/resolveWithStdlib/noneWithForEach.kt +++ b/compiler/fir/analysis-tests/testData/resolveWithStdlib/noneWithForEach.kt @@ -1,7 +1,3 @@ -// IGNORE_DIAGNOSTIC_API -// IGNORE_REVERSED_RESOLVE -// Ignore reason: KT-58786 - interface Diagnostic { val name: String } diff --git a/compiler/fir/cones/src/org/jetbrains/kotlin/fir/renderer/ConeTypeRenderer.kt b/compiler/fir/cones/src/org/jetbrains/kotlin/fir/renderer/ConeTypeRenderer.kt index 44172fa1e0e..bc70cd5e3ac 100644 --- a/compiler/fir/cones/src/org/jetbrains/kotlin/fir/renderer/ConeTypeRenderer.kt +++ b/compiler/fir/cones/src/org/jetbrains/kotlin/fir/renderer/ConeTypeRenderer.kt @@ -62,6 +62,9 @@ open class ConeTypeRenderer { } fun render(type: ConeKotlinType) { + type.abbreviatedType?.let { + return render(it) + } if (type !is ConeFlexibleType && type !is ConeDefinitelyNotNullType) { // We don't render attributes for flexible/definitely not null types here, // because bounds duplicate these attributes often diff --git a/compiler/fir/cones/src/org/jetbrains/kotlin/fir/types/AbbreviatedTypeAttribute.kt b/compiler/fir/cones/src/org/jetbrains/kotlin/fir/types/AbbreviatedTypeAttribute.kt new file mode 100644 index 00000000000..ead4c98ed45 --- /dev/null +++ b/compiler/fir/cones/src/org/jetbrains/kotlin/fir/types/AbbreviatedTypeAttribute.kt @@ -0,0 +1,26 @@ +/* + * Copyright 2010-2023 JetBrains s.r.o. and Kotlin Programming Language contributors. + * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. + */ + +package org.jetbrains.kotlin.fir.types + +import kotlin.reflect.KClass + +class AbbreviatedTypeAttribute( + val coneType: ConeKotlinType +): ConeAttribute() { + override fun union(other: AbbreviatedTypeAttribute?): AbbreviatedTypeAttribute? = null + override fun intersect(other: AbbreviatedTypeAttribute?): AbbreviatedTypeAttribute? = null + override fun add(other: AbbreviatedTypeAttribute?): AbbreviatedTypeAttribute? = null + override fun isSubtypeOf(other: AbbreviatedTypeAttribute?): Boolean = true + override fun toString(): String = "{${coneType.renderForDebugging()}=}" + + override val key: KClass + get() = AbbreviatedTypeAttribute::class +} + +val ConeAttributes.abbreviatedType: AbbreviatedTypeAttribute? by ConeAttributes.attributeAccessor() + +val ConeKotlinType.abbreviatedType: ConeKotlinType? + get() = attributes.abbreviatedType?.coneType \ No newline at end of file diff --git a/compiler/fir/cones/src/org/jetbrains/kotlin/fir/types/ConeAttributes.kt b/compiler/fir/cones/src/org/jetbrains/kotlin/fir/types/ConeAttributes.kt index 9ab97ee3bde..a391a6a343e 100644 --- a/compiler/fir/cones/src/org/jetbrains/kotlin/fir/types/ConeAttributes.kt +++ b/compiler/fir/cones/src/org/jetbrains/kotlin/fir/types/ConeAttributes.kt @@ -110,6 +110,15 @@ class ConeAttributes private constructor(attributes: List>) : A return create(attributes) } + fun replace(oldAttribute: ConeAttribute<*>, newAttribute: ConeAttribute<*>): ConeAttributes { + return create(buildList { + arrayMap.mapNotNullTo(this) { attr -> + attr.takeUnless { it == oldAttribute } + } + add(newAttribute) + }) + } + private inline fun perform(other: ConeAttributes, op: ConeAttribute<*>.(ConeAttribute<*>?) -> ConeAttribute<*>?): ConeAttributes { if (this.isEmpty() && other.isEmpty()) return this val attributes = mutableListOf>() diff --git a/compiler/fir/fir-deserialization/src/org/jetbrains/kotlin/fir/deserialization/FirTypeDeserializer.kt b/compiler/fir/fir-deserialization/src/org/jetbrains/kotlin/fir/deserialization/FirTypeDeserializer.kt index ec422e2c541..856271b3a41 100644 --- a/compiler/fir/fir-deserialization/src/org/jetbrains/kotlin/fir/deserialization/FirTypeDeserializer.kt +++ b/compiler/fir/fir-deserialization/src/org/jetbrains/kotlin/fir/deserialization/FirTypeDeserializer.kt @@ -201,8 +201,10 @@ class FirTypeDeserializer( else -> ConeClassLikeTypeImpl(constructor, arguments, isNullable = proto.nullable, attributes) } - // TODO: Return abbreviated types for type aliases, see KT-58542 - return simpleType + val abbreviatedType = proto.abbreviatedType(typeTable)?.let { simpleType(it, attributes) } + ?: return simpleType + + return simpleType.withAttributes(simpleType.attributes.plus(AbbreviatedTypeAttribute(abbreviatedType))) } private fun createSuspendFunctionTypeForBasicCase( diff --git a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirLightTreeBlackBoxCodegenTestGenerated.java b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirLightTreeBlackBoxCodegenTestGenerated.java index 59af22ab08f..2dec567c877 100644 --- a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirLightTreeBlackBoxCodegenTestGenerated.java +++ b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirLightTreeBlackBoxCodegenTestGenerated.java @@ -52587,6 +52587,12 @@ public class FirLightTreeBlackBoxCodegenTestGenerated extends AbstractFirLightTr KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/typealias"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test + @TestMetadata("deserializedAbbreviationWithRedundantArgument.kt") + public void testDeserializedAbbreviationWithRedundantArgument() throws Exception { + runTest("compiler/testData/codegen/box/typealias/deserializedAbbreviationWithRedundantArgument.kt"); + } + @Test @TestMetadata("enumEntryQualifier.kt") public void testEnumEntryQualifier() throws Exception { diff --git a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirLightTreeBlackBoxCodegenWithIrFakeOverrideGeneratorTestGenerated.java b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirLightTreeBlackBoxCodegenWithIrFakeOverrideGeneratorTestGenerated.java index e4a5b64ad5f..5dcea5be1aa 100644 --- a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirLightTreeBlackBoxCodegenWithIrFakeOverrideGeneratorTestGenerated.java +++ b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirLightTreeBlackBoxCodegenWithIrFakeOverrideGeneratorTestGenerated.java @@ -52587,6 +52587,12 @@ public class FirLightTreeBlackBoxCodegenWithIrFakeOverrideGeneratorTestGenerated KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/typealias"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test + @TestMetadata("deserializedAbbreviationWithRedundantArgument.kt") + public void testDeserializedAbbreviationWithRedundantArgument() throws Exception { + runTest("compiler/testData/codegen/box/typealias/deserializedAbbreviationWithRedundantArgument.kt"); + } + @Test @TestMetadata("enumEntryQualifier.kt") public void testEnumEntryQualifier() throws Exception { diff --git a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirPsiBlackBoxCodegenTestGenerated.java b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirPsiBlackBoxCodegenTestGenerated.java index 2a946d9bcd9..7c11533d8c4 100644 --- a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirPsiBlackBoxCodegenTestGenerated.java +++ b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirPsiBlackBoxCodegenTestGenerated.java @@ -52587,6 +52587,12 @@ public class FirPsiBlackBoxCodegenTestGenerated extends AbstractFirPsiBlackBoxCo KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/typealias"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test + @TestMetadata("deserializedAbbreviationWithRedundantArgument.kt") + public void testDeserializedAbbreviationWithRedundantArgument() throws Exception { + runTest("compiler/testData/codegen/box/typealias/deserializedAbbreviationWithRedundantArgument.kt"); + } + @Test @TestMetadata("enumEntryQualifier.kt") public void testEnumEntryQualifier() throws Exception { diff --git a/compiler/fir/providers/src/org/jetbrains/kotlin/fir/resolve/substitution/Substitutors.kt b/compiler/fir/providers/src/org/jetbrains/kotlin/fir/resolve/substitution/Substitutors.kt index 34c0e8f50b9..cb9e2658c67 100644 --- a/compiler/fir/providers/src/org/jetbrains/kotlin/fir/resolve/substitution/Substitutors.kt +++ b/compiler/fir/providers/src/org/jetbrains/kotlin/fir/resolve/substitution/Substitutors.kt @@ -53,10 +53,33 @@ abstract class AbstractConeSubstitutor(protected val typeContext: ConeTypeContex override fun substituteOrNull(type: ConeKotlinType): ConeKotlinType? { val newType = substituteType(type) + if (newType != null && type is ConeDefinitelyNotNullType) { return newType.makeConeTypeDefinitelyNotNullOrNotNull(typeContext, avoidComprehensiveCheck = false) } - return (newType ?: type.substituteRecursive()) + + val substitutedType = newType ?: type.substituteRecursive() + val substitutedAttributes = (substitutedType ?: type).attributes.substituteAbbreviationOrNull() + + return if (substitutedType != null || substitutedAttributes != null) { + var result = substitutedType ?: type + + if (substitutedAttributes != null) { + result = result.withAttributes(substitutedAttributes) + } + + result + } else { + null + } + } + + private fun ConeAttributes.substituteAbbreviationOrNull(): ConeAttributes? { + val abbreviatedTypeAttribute = abbreviatedType ?: return null + substituteOrNull(abbreviatedTypeAttribute.coneType)?.let { + return replace(abbreviatedTypeAttribute, AbbreviatedTypeAttribute(it)) + } + return null } private fun ConeKotlinType.substituteRecursive(): ConeKotlinType? { diff --git a/compiler/testData/codegen/box/typealias/deserializedAbbreviationWithRedundantArgument.fir.txt b/compiler/testData/codegen/box/typealias/deserializedAbbreviationWithRedundantArgument.fir.txt new file mode 100644 index 00000000000..c3899eca526 --- /dev/null +++ b/compiler/testData/codegen/box/typealias/deserializedAbbreviationWithRedundantArgument.fir.txt @@ -0,0 +1,19 @@ +Module: a +FILE: a.kt + public final typealias Foo = R|kotlin/collections/List| + public final class C : R|kotlin/Any| { + public constructor(): R|C| { + super() + } + + public final val foo: R|Foo?| = Null(null) + public get(): R|Foo?| + + } +Module: b +FILE: b.kt + public final val bar: R|Foo?| = R|/C.C|().R|SubstitutionOverride?|>| + public get(): R|Foo?| + public final fun box(): R|kotlin/String| { + ^box String(OK) + } diff --git a/compiler/testData/codegen/box/typealias/deserializedAbbreviationWithRedundantArgument.kt b/compiler/testData/codegen/box/typealias/deserializedAbbreviationWithRedundantArgument.kt new file mode 100644 index 00000000000..8b811920829 --- /dev/null +++ b/compiler/testData/codegen/box/typealias/deserializedAbbreviationWithRedundantArgument.kt @@ -0,0 +1,15 @@ +// FIR_DUMP +// MODULE: a +// FILE: a.kt +typealias Foo = List + +class C { + val foo: Foo? = null +} + +// MODULE: b(a) +// FILE: b.kt + +val bar = C().foo + +fun box() = "OK" \ No newline at end of file diff --git a/compiler/testData/loadJava/compiledKotlin/coroutines/TypeAliasFTSuspendWithReceiver.fir.txt b/compiler/testData/loadJava/compiledKotlin/coroutines/TypeAliasFTSuspendWithReceiver.fir.k1.txt similarity index 99% rename from compiler/testData/loadJava/compiledKotlin/coroutines/TypeAliasFTSuspendWithReceiver.fir.txt rename to compiler/testData/loadJava/compiledKotlin/coroutines/TypeAliasFTSuspendWithReceiver.fir.k1.txt index 543e6e98068..d24b82b2ba6 100644 --- a/compiler/testData/loadJava/compiledKotlin/coroutines/TypeAliasFTSuspendWithReceiver.fir.txt +++ b/compiler/testData/loadJava/compiledKotlin/coroutines/TypeAliasFTSuspendWithReceiver.fir.k1.txt @@ -6,4 +6,3 @@ public final class Context : R|kotlin/Any| { } public final typealias SuspendWithContext = R|suspend test/Context.() -> kotlin/Unit| - diff --git a/compiler/testData/loadJava/compiledKotlin/coroutines/TypeAliasFTSuspendWithReceiver.fir.k2.txt b/compiler/testData/loadJava/compiledKotlin/coroutines/TypeAliasFTSuspendWithReceiver.fir.k2.txt new file mode 100644 index 00000000000..f3941aa9d17 --- /dev/null +++ b/compiler/testData/loadJava/compiledKotlin/coroutines/TypeAliasFTSuspendWithReceiver.fir.k2.txt @@ -0,0 +1,9 @@ +public final fun foo(f: R|@ExtensionFunctionType {@ExtensionFunctionType kotlin/coroutines/SuspendFunction1=} suspend test/Context.() -> kotlin/Unit|): R|kotlin/Unit| + +public final class Context : R|kotlin/Any| { + public constructor(): R|test/Context| + +} + +public final typealias SuspendWithContext = R|suspend test/Context.() -> kotlin/Unit| + diff --git a/compiler/testData/loadJava/compiledKotlin/typealias/Basic.fir.k1.txt b/compiler/testData/loadJava/compiledKotlin/typealias/Basic.fir.k1.txt deleted file mode 100644 index 337d8a933bf..00000000000 --- a/compiler/testData/loadJava/compiledKotlin/typealias/Basic.fir.k1.txt +++ /dev/null @@ -1,23 +0,0 @@ -public final val x1: R|kotlin/String| - public get(): R|kotlin/String| - -public final val x2: R|kotlin/String| - public get(): R|kotlin/String| - -public final val x3: R|kotlin/String| - public get(): R|kotlin/String| - -public final val x4: R|kotlin/String?| - public get(): R|kotlin/String?| - -public final val x5: R|kotlin/String?| - public get(): R|kotlin/String?| - -public final val x6: R|kotlin/String?| - public get(): R|kotlin/String?| - -public final typealias S = R|kotlin/String| - -public final typealias SS = R|test/S| - -public final typealias SSS = R|test/SS| diff --git a/compiler/testData/loadJava/compiledKotlin/typealias/Basic.fir.k2.txt b/compiler/testData/loadJava/compiledKotlin/typealias/Basic.fir.k2.txt deleted file mode 100644 index 7ff2a803f5c..00000000000 --- a/compiler/testData/loadJava/compiledKotlin/typealias/Basic.fir.k2.txt +++ /dev/null @@ -1,23 +0,0 @@ -public final val x1: R|kotlin/String| - public get(): R|kotlin/String| - -public final val x2: R|kotlin/String| - public get(): R|kotlin/String| - -public final val x3: R|kotlin/String| - public get(): R|kotlin/String| - -public final val x4: R|kotlin/String?| - public get(): R|kotlin/String?| - -public final val x5: R|kotlin/String?| - public get(): R|kotlin/String?| - -public final val x6: R|kotlin/String?| - public get(): R|kotlin/String?| - -public final typealias S = R|kotlin/String| - -public final typealias SS = R|kotlin/String| - -public final typealias SSS = R|kotlin/String| diff --git a/compiler/testData/loadJava/compiledKotlin/typealias/Basic.fir.txt b/compiler/testData/loadJava/compiledKotlin/typealias/Basic.fir.txt new file mode 100644 index 00000000000..3cb97c107fd --- /dev/null +++ b/compiler/testData/loadJava/compiledKotlin/typealias/Basic.fir.txt @@ -0,0 +1,23 @@ +public final val x1: R|test/S| + public get(): R|test/S| + +public final val x2: R|test/SS| + public get(): R|test/SS| + +public final val x3: R|test/SSS| + public get(): R|test/SSS| + +public final val x4: R|test/S?| + public get(): R|test/S?| + +public final val x5: R|test/SS?| + public get(): R|test/SS?| + +public final val x6: R|test/SSS?| + public get(): R|test/SSS?| + +public final typealias S = R|kotlin/String| + +public final typealias SS = R|test/S| + +public final typealias SSS = R|test/SS| diff --git a/compiler/testData/loadJava/compiledKotlin/typealias/Generic.fir.k1.txt b/compiler/testData/loadJava/compiledKotlin/typealias/Generic.fir.k1.txt deleted file mode 100644 index 5f9fc939be7..00000000000 --- a/compiler/testData/loadJava/compiledKotlin/typealias/Generic.fir.k1.txt +++ /dev/null @@ -1,17 +0,0 @@ -public final fun test1(x: R|kotlin/collections/List|): R|kotlin/Unit| - -public final fun test2(x: R|kotlin/collections/List|): R|kotlin/Unit| - -public final fun test3(x: R|kotlin/collections/List|): R|kotlin/Unit| - -public final fun test4(x: R|kotlin/collections/List>|): R|kotlin/Unit| - -public final fun test5(x: R|kotlin/collections/List>|): R|kotlin/Unit| - -public final fun test6(x: R|kotlin/collections/List>|): R|kotlin/Unit| - -public final typealias L = R|kotlin/collections/List| - -public final typealias LL = R|test/L| - -public final typealias LLL = R|test/LL| diff --git a/compiler/testData/loadJava/compiledKotlin/typealias/Generic.fir.k2.txt b/compiler/testData/loadJava/compiledKotlin/typealias/Generic.fir.k2.txt deleted file mode 100644 index 0bfc9447318..00000000000 --- a/compiler/testData/loadJava/compiledKotlin/typealias/Generic.fir.k2.txt +++ /dev/null @@ -1,17 +0,0 @@ -public final fun test1(x: R|kotlin/collections/List|): R|kotlin/Unit| - -public final fun test2(x: R|kotlin/collections/List|): R|kotlin/Unit| - -public final fun test3(x: R|kotlin/collections/List|): R|kotlin/Unit| - -public final fun test4(x: R|kotlin/collections/List>|): R|kotlin/Unit| - -public final fun test5(x: R|kotlin/collections/List>|): R|kotlin/Unit| - -public final fun test6(x: R|kotlin/collections/List>|): R|kotlin/Unit| - -public final typealias L = R|kotlin/collections/List| - -public final typealias LL = R|kotlin/collections/List| - -public final typealias LLL = R|kotlin/collections/List| diff --git a/compiler/testData/loadJava/compiledKotlin/typealias/Generic.fir.txt b/compiler/testData/loadJava/compiledKotlin/typealias/Generic.fir.txt new file mode 100644 index 00000000000..fbfcd65989b --- /dev/null +++ b/compiler/testData/loadJava/compiledKotlin/typealias/Generic.fir.txt @@ -0,0 +1,17 @@ +public final fun test1(x: R|test/L|): R|kotlin/Unit| + +public final fun test2(x: R|test/LL|): R|kotlin/Unit| + +public final fun test3(x: R|test/LLL|): R|kotlin/Unit| + +public final fun test4(x: R|test/L>|): R|kotlin/Unit| + +public final fun test5(x: R|test/LL>|): R|kotlin/Unit| + +public final fun test6(x: R|test/LLL>|): R|kotlin/Unit| + +public final typealias L = R|kotlin/collections/List| + +public final typealias LL = R|test/L| + +public final typealias LLL = R|test/LL| diff --git a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/BlackBoxCodegenTestGenerated.java b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/BlackBoxCodegenTestGenerated.java index aee4f0d2740..d990f23c017 100644 --- a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/BlackBoxCodegenTestGenerated.java +++ b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/BlackBoxCodegenTestGenerated.java @@ -49617,6 +49617,12 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/typealias"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } + @Test + @TestMetadata("deserializedAbbreviationWithRedundantArgument.kt") + public void testDeserializedAbbreviationWithRedundantArgument() throws Exception { + runTest("compiler/testData/codegen/box/typealias/deserializedAbbreviationWithRedundantArgument.kt"); + } + @Test @TestMetadata("enumEntryQualifier.kt") public void testEnumEntryQualifier() throws Exception { diff --git a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenTestGenerated.java b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenTestGenerated.java index 45ec0333f8a..decbff3481b 100644 --- a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenTestGenerated.java +++ b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenTestGenerated.java @@ -52587,6 +52587,12 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/typealias"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test + @TestMetadata("deserializedAbbreviationWithRedundantArgument.kt") + public void testDeserializedAbbreviationWithRedundantArgument() throws Exception { + runTest("compiler/testData/codegen/box/typealias/deserializedAbbreviationWithRedundantArgument.kt"); + } + @Test @TestMetadata("enumEntryQualifier.kt") public void testEnumEntryQualifier() throws Exception { diff --git a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenWithIrInlinerTestGenerated.java b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenWithIrInlinerTestGenerated.java index 91894be3f95..a047c665b9a 100644 --- a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenWithIrInlinerTestGenerated.java +++ b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenWithIrInlinerTestGenerated.java @@ -52587,6 +52587,12 @@ public class IrBlackBoxCodegenWithIrInlinerTestGenerated extends AbstractIrBlack KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/typealias"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test + @TestMetadata("deserializedAbbreviationWithRedundantArgument.kt") + public void testDeserializedAbbreviationWithRedundantArgument() throws Exception { + runTest("compiler/testData/codegen/box/typealias/deserializedAbbreviationWithRedundantArgument.kt"); + } + @Test @TestMetadata("enumEntryQualifier.kt") public void testEnumEntryQualifier() throws Exception { diff --git a/compiler/tests-gen/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java b/compiler/tests-gen/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java index c39ea0b8f5c..e40f65a5142 100644 --- a/compiler/tests-gen/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java +++ b/compiler/tests-gen/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java @@ -42445,6 +42445,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/typealias"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @TestMetadata("deserializedAbbreviationWithRedundantArgument.kt") + public void testDeserializedAbbreviationWithRedundantArgument() throws Exception { + runTest("compiler/testData/codegen/box/typealias/deserializedAbbreviationWithRedundantArgument.kt"); + } + @TestMetadata("enumEntryQualifier.kt") public void testEnumEntryQualifier() throws Exception { runTest("compiler/testData/codegen/box/typealias/enumEntryQualifier.kt"); diff --git a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/fir/FirJsCodegenBoxTestGenerated.java b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/fir/FirJsCodegenBoxTestGenerated.java index aca711ef63b..29ea1dce08b 100644 --- a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/fir/FirJsCodegenBoxTestGenerated.java +++ b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/fir/FirJsCodegenBoxTestGenerated.java @@ -36465,6 +36465,12 @@ public class FirJsCodegenBoxTestGenerated extends AbstractFirJsCodegenBoxTest { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/typealias"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true); } + @Test + @TestMetadata("deserializedAbbreviationWithRedundantArgument.kt") + public void testDeserializedAbbreviationWithRedundantArgument() throws Exception { + runTest("compiler/testData/codegen/box/typealias/deserializedAbbreviationWithRedundantArgument.kt"); + } + @Test @TestMetadata("enumEntryQualifier.kt") public void testEnumEntryQualifier() throws Exception { diff --git a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/fir/FirJsES6CodegenBoxTestGenerated.java b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/fir/FirJsES6CodegenBoxTestGenerated.java index 2eac2f09d9a..7fdb9e51a60 100644 --- a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/fir/FirJsES6CodegenBoxTestGenerated.java +++ b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/fir/FirJsES6CodegenBoxTestGenerated.java @@ -36465,6 +36465,12 @@ public class FirJsES6CodegenBoxTestGenerated extends AbstractFirJsES6CodegenBoxT KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/typealias"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR_ES6, true); } + @Test + @TestMetadata("deserializedAbbreviationWithRedundantArgument.kt") + public void testDeserializedAbbreviationWithRedundantArgument() throws Exception { + runTest("compiler/testData/codegen/box/typealias/deserializedAbbreviationWithRedundantArgument.kt"); + } + @Test @TestMetadata("enumEntryQualifier.kt") public void testEnumEntryQualifier() throws Exception { diff --git a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/IrJsCodegenBoxTestGenerated.java b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/IrJsCodegenBoxTestGenerated.java index cfbd6cf2cff..232c11c7e5f 100644 --- a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/IrJsCodegenBoxTestGenerated.java +++ b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/IrJsCodegenBoxTestGenerated.java @@ -36465,6 +36465,12 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/typealias"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true); } + @Test + @TestMetadata("deserializedAbbreviationWithRedundantArgument.kt") + public void testDeserializedAbbreviationWithRedundantArgument() throws Exception { + runTest("compiler/testData/codegen/box/typealias/deserializedAbbreviationWithRedundantArgument.kt"); + } + @Test @TestMetadata("enumEntryQualifier.kt") public void testEnumEntryQualifier() throws Exception { diff --git a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/IrJsES6CodegenBoxTestGenerated.java b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/IrJsES6CodegenBoxTestGenerated.java index ea5ee5f04cc..eec0d3e3397 100644 --- a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/IrJsES6CodegenBoxTestGenerated.java +++ b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/IrJsES6CodegenBoxTestGenerated.java @@ -36465,6 +36465,12 @@ public class IrJsES6CodegenBoxTestGenerated extends AbstractIrJsES6CodegenBoxTes KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/typealias"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR_ES6, true); } + @Test + @TestMetadata("deserializedAbbreviationWithRedundantArgument.kt") + public void testDeserializedAbbreviationWithRedundantArgument() throws Exception { + runTest("compiler/testData/codegen/box/typealias/deserializedAbbreviationWithRedundantArgument.kt"); + } + @Test @TestMetadata("enumEntryQualifier.kt") public void testEnumEntryQualifier() throws Exception { diff --git a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/FirNativeCodegenBoxTestGenerated.java b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/FirNativeCodegenBoxTestGenerated.java index e0cfcfcf034..8b5a4c89c73 100644 --- a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/FirNativeCodegenBoxTestGenerated.java +++ b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/FirNativeCodegenBoxTestGenerated.java @@ -39923,6 +39923,12 @@ public class FirNativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTe KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/typealias"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.NATIVE, true); } + @Test + @TestMetadata("deserializedAbbreviationWithRedundantArgument.kt") + public void testDeserializedAbbreviationWithRedundantArgument() throws Exception { + runTest("compiler/testData/codegen/box/typealias/deserializedAbbreviationWithRedundantArgument.kt"); + } + @Test @TestMetadata("enumEntryQualifier.kt") public void testEnumEntryQualifier() throws Exception { diff --git a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/FirNativeCodegenBoxTestNoPLGenerated.java b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/FirNativeCodegenBoxTestNoPLGenerated.java index 7fda96a0a68..239c5760570 100644 --- a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/FirNativeCodegenBoxTestNoPLGenerated.java +++ b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/FirNativeCodegenBoxTestNoPLGenerated.java @@ -40957,6 +40957,12 @@ public class FirNativeCodegenBoxTestNoPLGenerated extends AbstractNativeCodegenB KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/typealias"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.NATIVE, true); } + @Test + @TestMetadata("deserializedAbbreviationWithRedundantArgument.kt") + public void testDeserializedAbbreviationWithRedundantArgument() throws Exception { + runTest("compiler/testData/codegen/box/typealias/deserializedAbbreviationWithRedundantArgument.kt"); + } + @Test @TestMetadata("enumEntryQualifier.kt") public void testEnumEntryQualifier() throws Exception { diff --git a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/NativeCodegenBoxTestGenerated.java b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/NativeCodegenBoxTestGenerated.java index 4daf87cde0a..eba4906929c 100644 --- a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/NativeCodegenBoxTestGenerated.java +++ b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/NativeCodegenBoxTestGenerated.java @@ -39407,6 +39407,12 @@ public class NativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTest KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/typealias"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.NATIVE, true); } + @Test + @TestMetadata("deserializedAbbreviationWithRedundantArgument.kt") + public void testDeserializedAbbreviationWithRedundantArgument() throws Exception { + runTest("compiler/testData/codegen/box/typealias/deserializedAbbreviationWithRedundantArgument.kt"); + } + @Test @TestMetadata("enumEntryQualifier.kt") public void testEnumEntryQualifier() throws Exception { diff --git a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/NativeCodegenBoxTestNoPLGenerated.java b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/NativeCodegenBoxTestNoPLGenerated.java index 5139d089349..ff631ee5873 100644 --- a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/NativeCodegenBoxTestNoPLGenerated.java +++ b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/NativeCodegenBoxTestNoPLGenerated.java @@ -39924,6 +39924,12 @@ public class NativeCodegenBoxTestNoPLGenerated extends AbstractNativeCodegenBoxT KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/typealias"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.NATIVE, true); } + @Test + @TestMetadata("deserializedAbbreviationWithRedundantArgument.kt") + public void testDeserializedAbbreviationWithRedundantArgument() throws Exception { + runTest("compiler/testData/codegen/box/typealias/deserializedAbbreviationWithRedundantArgument.kt"); + } + @Test @TestMetadata("enumEntryQualifier.kt") public void testEnumEntryQualifier() throws Exception { diff --git a/wasm/wasm.tests/tests-gen/org/jetbrains/kotlin/wasm/test/FirWasmCodegenBoxTestGenerated.java b/wasm/wasm.tests/tests-gen/org/jetbrains/kotlin/wasm/test/FirWasmCodegenBoxTestGenerated.java index 9fd061e4ea9..aece73e69e8 100644 --- a/wasm/wasm.tests/tests-gen/org/jetbrains/kotlin/wasm/test/FirWasmCodegenBoxTestGenerated.java +++ b/wasm/wasm.tests/tests-gen/org/jetbrains/kotlin/wasm/test/FirWasmCodegenBoxTestGenerated.java @@ -36135,6 +36135,12 @@ public class FirWasmCodegenBoxTestGenerated extends AbstractFirWasmCodegenBoxTes KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/typealias"), Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.WASM, true); } + @Test + @TestMetadata("deserializedAbbreviationWithRedundantArgument.kt") + public void testDeserializedAbbreviationWithRedundantArgument() throws Exception { + runTest("compiler/testData/codegen/box/typealias/deserializedAbbreviationWithRedundantArgument.kt"); + } + @Test @TestMetadata("enumEntryQualifier.kt") public void testEnumEntryQualifier() throws Exception { diff --git a/wasm/wasm.tests/tests-gen/org/jetbrains/kotlin/wasm/test/K1WasmCodegenBoxTestGenerated.java b/wasm/wasm.tests/tests-gen/org/jetbrains/kotlin/wasm/test/K1WasmCodegenBoxTestGenerated.java index 376ce7e1c67..8b7583720de 100644 --- a/wasm/wasm.tests/tests-gen/org/jetbrains/kotlin/wasm/test/K1WasmCodegenBoxTestGenerated.java +++ b/wasm/wasm.tests/tests-gen/org/jetbrains/kotlin/wasm/test/K1WasmCodegenBoxTestGenerated.java @@ -36135,6 +36135,12 @@ public class K1WasmCodegenBoxTestGenerated extends AbstractK1WasmCodegenBoxTest KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/typealias"), Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.WASM, true); } + @Test + @TestMetadata("deserializedAbbreviationWithRedundantArgument.kt") + public void testDeserializedAbbreviationWithRedundantArgument() throws Exception { + runTest("compiler/testData/codegen/box/typealias/deserializedAbbreviationWithRedundantArgument.kt"); + } + @Test @TestMetadata("enumEntryQualifier.kt") public void testEnumEntryQualifier() throws Exception {