diff --git a/analysis/analysis-api/testData/components/callResolver/resolveCall/samConstructorCall.txt b/analysis/analysis-api/testData/components/callResolver/resolveCall/samConstructorCall.txt index 299587c42b9..ab8d5e379a7 100644 --- a/analysis/analysis-api/testData/components/callResolver/resolveCall/samConstructorCall.txt +++ b/analysis/analysis-api/testData/components/callResolver/resolveCall/samConstructorCall.txt @@ -7,7 +7,7 @@ KtSuccessCallInfo: signature = KtFunctionLikeSignature: receiverType = null returnType = java.util.Comparator - symbol = java/util/Comparator(function: kotlin.Function2, ft, kotlin.Int>): java.util.Comparator + symbol = kotlin/Comparator(function: kotlin.Function2, ft, kotlin.Int>): java.util.Comparator valueParameters = [ KtVariableLikeSignature: name = function @@ -16,7 +16,7 @@ KtSuccessCallInfo: symbol = function: kotlin.Function2, ft, kotlin.Int> callableIdIfNonLocal = null ] - callableIdIfNonLocal = java/util/Comparator + callableIdIfNonLocal = kotlin/Comparator typeArgumentsMapping = { T -> (kotlin.Int!) } diff --git a/analysis/analysis-api/testData/components/callResolver/resolveCandidates/singleCandidate/samConstructorCall.txt b/analysis/analysis-api/testData/components/callResolver/resolveCandidates/singleCandidate/samConstructorCall.txt index 0e705a78179..d094573d272 100644 --- a/analysis/analysis-api/testData/components/callResolver/resolveCandidates/singleCandidate/samConstructorCall.txt +++ b/analysis/analysis-api/testData/components/callResolver/resolveCandidates/singleCandidate/samConstructorCall.txt @@ -7,7 +7,7 @@ KtApplicableCallCandidateInfo: signature = KtFunctionLikeSignature: receiverType = null returnType = java.util.Comparator - symbol = java/util/Comparator(function: kotlin.Function2, ft, kotlin.Int>): java.util.Comparator + symbol = kotlin/Comparator(function: kotlin.Function2, ft, kotlin.Int>): java.util.Comparator valueParameters = [ KtVariableLikeSignature: name = function @@ -16,7 +16,7 @@ KtApplicableCallCandidateInfo: symbol = function: kotlin.Function2, ft, kotlin.Int> callableIdIfNonLocal = null ] - callableIdIfNonLocal = java/util/Comparator + callableIdIfNonLocal = kotlin/Comparator typeArgumentsMapping = { T -> (kotlin.Int!) } diff --git a/compiler/fir/analysis-tests/testData/resolveWithStdlib/kotlinComparatorAlias.fir.txt b/compiler/fir/analysis-tests/testData/resolveWithStdlib/kotlinComparatorAlias.fir.txt index aa1055498ac..e2b7ffa05fe 100644 --- a/compiler/fir/analysis-tests/testData/resolveWithStdlib/kotlinComparatorAlias.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolveWithStdlib/kotlinComparatorAlias.fir.txt @@ -1,6 +1,6 @@ FILE: kotlinComparatorAlias.kt public final fun test_1(): R|kotlin/Unit| { - lval comp: R|java/util/Comparator| = R|java/util/Comparator|( = Comparator@fun (x: R|kotlin/Int!|, y: R|kotlin/Int!|): R|kotlin/Int| { + lval comp: R|java/util/Comparator| = R|kotlin/Comparator|( = Comparator@fun (x: R|kotlin/Int!|, y: R|kotlin/Int!|): R|kotlin/Int| { ^ Int(1) } ) diff --git a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirBlackBoxCodegenTestGenerated.java b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirBlackBoxCodegenTestGenerated.java index fac9c616693..39b35387f7d 100644 --- a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirBlackBoxCodegenTestGenerated.java +++ b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirBlackBoxCodegenTestGenerated.java @@ -18461,6 +18461,12 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT runTest("compiler/testData/codegen/box/funInterface/funInterfaceInheritance.kt"); } + @Test + @TestMetadata("funInterfaceTypealias.kt") + public void testFunInterfaceTypealias() throws Exception { + runTest("compiler/testData/codegen/box/funInterface/funInterfaceTypealias.kt"); + } + @Test @TestMetadata("funInterfaceWithReceiver.kt") public void testFunInterfaceWithReceiver() throws Exception { diff --git a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/SamResolution.kt b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/SamResolution.kt index 699542f9450..cdcc205d329 100644 --- a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/SamResolution.kt +++ b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/SamResolution.kt @@ -111,14 +111,7 @@ class FirSamResolverImpl( val firRegularClass = classSymbol.fir val (functionSymbol, functionType) = resolveFunctionTypeIfSamInterface(firRegularClass) ?: return null - val classId = firRegularClass.classId - val syntheticFunctionSymbol = FirSyntheticFunctionSymbol( - CallableId( - classId.packageFqName, - classId.relativeClassName.parent().takeIf { !it.isRoot }, - classId.shortClassName, - ), - ) + val syntheticFunctionSymbol = classSymbol.createSyntheticConstructorSymbol() val newTypeParameters = firRegularClass.typeParameters.map { typeParameter -> val declaredTypeParameter = typeParameter.symbol.fir // TODO: or really declared? @@ -160,7 +153,7 @@ class FirSamResolverImpl( return buildSimpleFunction { moduleData = session.moduleData source = firRegularClass.source - name = classId.shortClassName + name = syntheticFunctionSymbol.name origin = FirDeclarationOrigin.SamConstructor val visibility = firRegularClass.visibility status = FirResolvedDeclarationStatusImpl( @@ -223,7 +216,10 @@ class FirSamResolverImpl( val expansionRegularClass = type.lookupTag.toSymbol(session)?.fir as? FirRegularClass ?: return null val samConstructorForClass = getSamConstructor(expansionRegularClass) ?: return null - val substitutor = expansionRegularClass.buildSubstitutorForSamTypeAlias(session, type) + // The constructor is something like `fun C(...): C`, meaning the type parameters + // we need to replace are owned by it, not by the class (see the substitutor in `buildSamConstructor` + // for `FirRegularClass` above). + val substitutor = samConstructorForClass.buildSubstitutorForSamTypeAlias(session, type) ?: return samConstructorForClass.symbol val newReturnType = substitutor.substituteOrNull(samConstructorForClass.returnTypeRef.coneType) val newParameterTypes = samConstructorForClass.valueParameters.map { @@ -236,19 +232,28 @@ class FirSamResolverImpl( return samConstructorForClass.symbol } - val namedSymbol = samConstructorForClass.symbol - val symbolForOverride = FirFakeOverrideGenerator.createSymbolForSubstitutionOverride(namedSymbol, expansionRegularClass.classId) - - return FirFakeOverrideGenerator.createSubstitutionOverrideFunction( - session, symbolForOverride, samConstructorForClass, + return FirFakeOverrideGenerator.createCopyForFirFunction( + typeAliasSymbol.createSyntheticConstructorSymbol(), samConstructorForClass, derivedClassLookupTag = null, + session, FirDeclarationOrigin.SamConstructor, newDispatchReceiverType = null, newReceiverType = null, - newContextReceiverTypes, - newReturnType, newParameterTypes, typeAliasSymbol.fir.typeParameters, - ) + newContextReceiverTypes = newContextReceiverTypes, + newReturnType = newReturnType, + newParameterTypes = newParameterTypes, + newTypeParameters = typeAliasSymbol.fir.typeParameters, + ).symbol } + private fun FirClassLikeSymbol<*>.createSyntheticConstructorSymbol() = + FirSyntheticFunctionSymbol( + CallableId( + classId.packageFqName, + classId.relativeClassName.parent().takeIf { !it.isRoot }, + classId.shortClassName, + ), + ) + private fun resolveFunctionTypeIfSamInterface(firRegularClass: FirRegularClass): SAMInfo? { return resolvedFunctionType.getOrPut(firRegularClass) { if (!firRegularClass.status.isFun) return@getOrPut null @@ -269,7 +274,7 @@ class FirSamResolverImpl( } } -private fun FirRegularClass.buildSubstitutorForSamTypeAlias(session: FirSession, type: ConeClassLikeType): ConeSubstitutor? { +private fun FirTypeParameterRefsOwner.buildSubstitutorForSamTypeAlias(session: FirSession, type: ConeClassLikeType): ConeSubstitutor? { if (typeParameters.isEmpty()) return null val mapping = typeParameters.zip(type.typeArguments).associate { (parameter, projection) -> val typeArgument = diff --git a/compiler/testData/codegen/box/funInterface/funInterfaceTypealias.kt b/compiler/testData/codegen/box/funInterface/funInterfaceTypealias.kt new file mode 100644 index 00000000000..e1bc73593f6 --- /dev/null +++ b/compiler/testData/codegen/box/funInterface/funInterfaceTypealias.kt @@ -0,0 +1,30 @@ +fun interface KRunnable { + fun invoke() +} + +fun interface KConsumer { + fun accept(value: T) +} + +typealias KRunnableAlias = KRunnable + +typealias StringConsumer = KConsumer + +fun foo(f: KRunnable) = f + +fun bar(f: KConsumer) = f + +fun box(): String { + var result = "" + foo(KRunnable { + bar(KConsumer { + result += it + }).accept("O") + }).invoke() + foo(KRunnableAlias { + bar(StringConsumer { + result += it + }).accept("K") + }).invoke() + return result +} diff --git a/compiler/testData/diagnostics/testsWithStdLib/typealias/typeAliasSamAdapterConstructors.fir.kt b/compiler/testData/diagnostics/testsWithStdLib/typealias/typeAliasSamAdapterConstructors.fir.kt deleted file mode 100644 index f04034ec293..00000000000 --- a/compiler/testData/diagnostics/testsWithStdLib/typealias/typeAliasSamAdapterConstructors.fir.kt +++ /dev/null @@ -1,8 +0,0 @@ -// FILE: test.kt -typealias RunnableT = java.lang.Runnable -typealias ComparatorT = java.util.Comparator -typealias ComparatorStrT = ComparatorT - -val test1 = RunnableT { } -val test2 = ComparatorT { s1, s2 -> s1.compareTo(s2) } -val test3 = ComparatorStrT { s1, s2 -> s1.compareTo(s2) } diff --git a/compiler/testData/diagnostics/testsWithStdLib/typealias/typeAliasSamAdapterConstructors.kt b/compiler/testData/diagnostics/testsWithStdLib/typealias/typeAliasSamAdapterConstructors.kt index a5e4f8db692..cdb81eea98e 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/typealias/typeAliasSamAdapterConstructors.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/typealias/typeAliasSamAdapterConstructors.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL // FILE: test.kt typealias RunnableT = java.lang.Runnable typealias ComparatorT = java.util.Comparator diff --git a/compiler/testData/diagnostics/testsWithStdLib/typealias/typeAliasSamAdapterConstructors2.fir.kt b/compiler/testData/diagnostics/testsWithStdLib/typealias/typeAliasSamAdapterConstructors2.fir.kt deleted file mode 100644 index 253a8e7aaaa..00000000000 --- a/compiler/testData/diagnostics/testsWithStdLib/typealias/typeAliasSamAdapterConstructors2.fir.kt +++ /dev/null @@ -1,27 +0,0 @@ -// FILE: JHost.java -public class JHost { - public static interface Runnable { - void run(); - } - - public static interface Consumer { - void consume(T x); - } - - public static interface Consumer2 { - void run(T1 x1, T2 x2); - } -} - -// FILE: test.kt -typealias R = JHost.Runnable -typealias C = JHost.Consumer -typealias CStr = JHost.Consumer -typealias CStrList = JHost.Consumer> -typealias C2 = JHost.Consumer2 - -val test1 = R { } -val test2 = C { s -> println(s.length) } -val test3 = CStr { s -> println(s.length) } -val test4 = CStrList { ss -> for (s in ss) { println(s.length) } } -val test5 = C2<Int> { a, b -> val x: Int = a + b; println(x)} diff --git a/compiler/testData/diagnostics/testsWithStdLib/typealias/typeAliasSamAdapterConstructors2.kt b/compiler/testData/diagnostics/testsWithStdLib/typealias/typeAliasSamAdapterConstructors2.kt index 1fc32ad0417..65501f0a8a9 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/typealias/typeAliasSamAdapterConstructors2.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/typealias/typeAliasSamAdapterConstructors2.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL // FILE: JHost.java public class JHost { public static interface Runnable { diff --git a/compiler/testData/ir/irText/expressions/funInterfaceConstructorReference.fir.ir.txt b/compiler/testData/ir/irText/expressions/funInterfaceConstructorReference.fir.ir.txt index 727674634f8..f3a28a790a6 100644 --- a/compiler/testData/ir/irText/expressions/funInterfaceConstructorReference.fir.ir.txt +++ b/compiler/testData/ir/irText/expressions/funInterfaceConstructorReference.fir.ir.txt @@ -112,15 +112,15 @@ FILE fqName: fileName:/funInterfaceConstructorReference.kt BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun test2a (): kotlin.Function1, .KSupplier> declared in ' BLOCK type=kotlin.reflect.KFunction1, .KSupplier> origin=FUN_INTERFACE_CONSTRUCTOR_REFERENCE - FUN ADAPTER_FOR_FUN_INTERFACE_CONSTRUCTOR name:KSupplier visibility:local modality:FINAL <> (function:kotlin.Function0) returnType:.KSupplier + FUN ADAPTER_FOR_FUN_INTERFACE_CONSTRUCTOR name:KSS visibility:local modality:FINAL <> (function:kotlin.Function0) returnType:.KSupplier VALUE_PARAMETER ADAPTER_PARAMETER_FOR_CALLABLE_REFERENCE name:function index:0 type:kotlin.Function0 BLOCK_BODY - RETURN type=kotlin.Nothing from='local final fun KSupplier (function: kotlin.Function0): .KSupplier declared in .test2a' + RETURN type=kotlin.Nothing from='local final fun KSS (function: kotlin.Function0): .KSupplier declared in .test2a' TYPE_OP type=.KSupplier origin=SAM_CONVERSION typeOperand=.KSupplier CALL 'public final fun CHECK_NOT_NULL (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type=kotlin.Function0 origin=EXCLEXCL : kotlin.Function0 - arg0: GET_VAR 'function: kotlin.Function0 declared in .test2a.KSupplier' type=kotlin.Function0 origin=null - FUNCTION_REFERENCE 'local final fun KSupplier (function: kotlin.Function0): .KSupplier declared in .test2a' type=kotlin.reflect.KFunction1, .KSupplier> origin=FUN_INTERFACE_CONSTRUCTOR_REFERENCE reflectionTarget= + arg0: GET_VAR 'function: kotlin.Function0 declared in .test2a.KSS' type=kotlin.Function0 origin=null + FUNCTION_REFERENCE 'local final fun KSS (function: kotlin.Function0): .KSupplier declared in .test2a' type=kotlin.reflect.KFunction1, .KSupplier> origin=FUN_INTERFACE_CONSTRUCTOR_REFERENCE reflectionTarget= FUN name:test3 visibility:public modality:FINAL <> () returnType:kotlin.Function1, .KConsumer> BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun test3 (): kotlin.Function1, .KConsumer> declared in ' @@ -138,15 +138,15 @@ FILE fqName: fileName:/funInterfaceConstructorReference.kt BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun test3a (): kotlin.Function1, .KConsumer> declared in ' BLOCK type=kotlin.reflect.KFunction1, .KConsumer> origin=FUN_INTERFACE_CONSTRUCTOR_REFERENCE - FUN ADAPTER_FOR_FUN_INTERFACE_CONSTRUCTOR name:KConsumer visibility:local modality:FINAL <> (function:kotlin.Function1) returnType:.KConsumer + FUN ADAPTER_FOR_FUN_INTERFACE_CONSTRUCTOR name:KCS visibility:local modality:FINAL <> (function:kotlin.Function1) returnType:.KConsumer VALUE_PARAMETER ADAPTER_PARAMETER_FOR_CALLABLE_REFERENCE name:function index:0 type:kotlin.Function1 BLOCK_BODY - RETURN type=kotlin.Nothing from='local final fun KConsumer (function: kotlin.Function1): .KConsumer declared in .test3a' + RETURN type=kotlin.Nothing from='local final fun KCS (function: kotlin.Function1): .KConsumer declared in .test3a' TYPE_OP type=.KConsumer origin=SAM_CONVERSION typeOperand=.KConsumer CALL 'public final fun CHECK_NOT_NULL (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type=kotlin.Function1 origin=EXCLEXCL : kotlin.Function1 - arg0: GET_VAR 'function: kotlin.Function1 declared in .test3a.KConsumer' type=kotlin.Function1 origin=null - FUNCTION_REFERENCE 'local final fun KConsumer (function: kotlin.Function1): .KConsumer declared in .test3a' type=kotlin.reflect.KFunction1, .KConsumer> origin=FUN_INTERFACE_CONSTRUCTOR_REFERENCE reflectionTarget= + arg0: GET_VAR 'function: kotlin.Function1 declared in .test3a.KCS' type=kotlin.Function1 origin=null + FUNCTION_REFERENCE 'local final fun KCS (function: kotlin.Function1): .KConsumer declared in .test3a' type=kotlin.reflect.KFunction1, .KConsumer> origin=FUN_INTERFACE_CONSTRUCTOR_REFERENCE reflectionTarget= FUN name:test3b visibility:public modality:FINAL <> () returnType:kotlin.reflect.KFunction<.KConsumer> BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun test3b (): kotlin.reflect.KFunction<.KConsumer> declared in ' diff --git a/compiler/testData/ir/irText/expressions/funInterfaceConstructorReference.fir.kt.txt b/compiler/testData/ir/irText/expressions/funInterfaceConstructorReference.fir.kt.txt index 5bd3ad647aa..7a5ee4fe1a0 100644 --- a/compiler/testData/ir/irText/expressions/funInterfaceConstructorReference.fir.kt.txt +++ b/compiler/testData/ir/irText/expressions/funInterfaceConstructorReference.fir.kt.txt @@ -58,11 +58,11 @@ fun test2(): Function1, KSupplier> { fun test2a(): Function1, KSupplier> { return { // BLOCK - local fun KSupplier(function: Function0): KSupplier { + local fun KSS(function: Function0): KSupplier { return CHECK_NOT_NULL>(arg0 = function) /*-> KSupplier */ } - ::KSupplier + ::KSS } } @@ -78,11 +78,11 @@ fun test3(): Function1, KConsumer> { fun test3a(): Function1, KConsumer> { return { // BLOCK - local fun KConsumer(function: Function1): KConsumer { + local fun KCS(function: Function1): KConsumer { return CHECK_NOT_NULL>(arg0 = function) /*-> KConsumer */ } - ::KConsumer + ::KCS } } @@ -95,4 +95,3 @@ fun test3b(): KFunction> { ::KConsumer } } - 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 7fed798b289..eb25c750833 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 @@ -17723,6 +17723,12 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { runTest("compiler/testData/codegen/box/funInterface/funInterfaceInheritance.kt"); } + @Test + @TestMetadata("funInterfaceTypealias.kt") + public void testFunInterfaceTypealias() throws Exception { + runTest("compiler/testData/codegen/box/funInterface/funInterfaceTypealias.kt"); + } + @Test @TestMetadata("funInterfaceWithReceiver.kt") public void testFunInterfaceWithReceiver() 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 fde87815b77..c75b4becd3b 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 @@ -18461,6 +18461,12 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes runTest("compiler/testData/codegen/box/funInterface/funInterfaceInheritance.kt"); } + @Test + @TestMetadata("funInterfaceTypealias.kt") + public void testFunInterfaceTypealias() throws Exception { + runTest("compiler/testData/codegen/box/funInterface/funInterfaceTypealias.kt"); + } + @Test @TestMetadata("funInterfaceWithReceiver.kt") public void testFunInterfaceWithReceiver() 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 8dbf5cc39e1..13b188a84d8 100644 --- a/compiler/tests-gen/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java +++ b/compiler/tests-gen/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java @@ -14710,6 +14710,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes runTest("compiler/testData/codegen/box/funInterface/funInterfaceInheritance.kt"); } + @TestMetadata("funInterfaceTypealias.kt") + public void testFunInterfaceTypealias() throws Exception { + runTest("compiler/testData/codegen/box/funInterface/funInterfaceTypealias.kt"); + } + @TestMetadata("funInterfaceWithReceiver.kt") public void testFunInterfaceWithReceiver() throws Exception { runTest("compiler/testData/codegen/box/funInterface/funInterfaceWithReceiver.kt"); diff --git a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/JsCodegenBoxTestGenerated.java b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/JsCodegenBoxTestGenerated.java index f68fab303f4..a50df4769e0 100644 --- a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/JsCodegenBoxTestGenerated.java +++ b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/JsCodegenBoxTestGenerated.java @@ -13609,6 +13609,12 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { runTest("compiler/testData/codegen/box/funInterface/funInterfaceInheritance.kt"); } + @Test + @TestMetadata("funInterfaceTypealias.kt") + public void testFunInterfaceTypealias() throws Exception { + runTest("compiler/testData/codegen/box/funInterface/funInterfaceTypealias.kt"); + } + @Test @TestMetadata("funInterfaceWithReceiver.kt") public void testFunInterfaceWithReceiver() throws Exception { 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 507c212c2bc..7cd1271d4fc 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 @@ -13705,6 +13705,12 @@ public class FirJsCodegenBoxTestGenerated extends AbstractFirJsCodegenBoxTest { runTest("compiler/testData/codegen/box/funInterface/funInterfaceInheritance.kt"); } + @Test + @TestMetadata("funInterfaceTypealias.kt") + public void testFunInterfaceTypealias() throws Exception { + runTest("compiler/testData/codegen/box/funInterface/funInterfaceTypealias.kt"); + } + @Test @TestMetadata("funInterfaceWithReceiver.kt") public void testFunInterfaceWithReceiver() 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 5ddfb0b9939..f1bcf6ea1f4 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 @@ -13705,6 +13705,12 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest { runTest("compiler/testData/codegen/box/funInterface/funInterfaceInheritance.kt"); } + @Test + @TestMetadata("funInterfaceTypealias.kt") + public void testFunInterfaceTypealias() throws Exception { + runTest("compiler/testData/codegen/box/funInterface/funInterfaceTypealias.kt"); + } + @Test @TestMetadata("funInterfaceWithReceiver.kt") public void testFunInterfaceWithReceiver() throws Exception { diff --git a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/testOld/wasm/semantics/IrCodegenBoxWasmTestGenerated.java b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/testOld/wasm/semantics/IrCodegenBoxWasmTestGenerated.java index af3c578819c..20ba3aa1420 100644 --- a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/testOld/wasm/semantics/IrCodegenBoxWasmTestGenerated.java +++ b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/testOld/wasm/semantics/IrCodegenBoxWasmTestGenerated.java @@ -12185,6 +12185,11 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest runTest("compiler/testData/codegen/box/funInterface/funInterfaceInheritance.kt"); } + @TestMetadata("funInterfaceTypealias.kt") + public void testFunInterfaceTypealias() throws Exception { + runTest("compiler/testData/codegen/box/funInterface/funInterfaceTypealias.kt"); + } + @TestMetadata("funInterfaceWithReceiver.kt") public void testFunInterfaceWithReceiver() throws Exception { runTest("compiler/testData/codegen/box/funInterface/funInterfaceWithReceiver.kt"); 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 8ae651d2576..8021bdcc732 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 @@ -14749,6 +14749,12 @@ public class NativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTest runTest("compiler/testData/codegen/box/funInterface/funInterfaceInheritance.kt"); } + @Test + @TestMetadata("funInterfaceTypealias.kt") + public void testFunInterfaceTypealias() throws Exception { + runTest("compiler/testData/codegen/box/funInterface/funInterfaceTypealias.kt"); + } + @Test @TestMetadata("funInterfaceWithReceiver.kt") public void testFunInterfaceWithReceiver() throws Exception {