diff --git a/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/DiagnosisCompilerTestFE10TestdataTestGenerated.java b/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/DiagnosisCompilerTestFE10TestdataTestGenerated.java index 72b3bd3d98e..48738acd6b2 100644 --- a/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/DiagnosisCompilerTestFE10TestdataTestGenerated.java +++ b/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/DiagnosisCompilerTestFE10TestdataTestGenerated.java @@ -15475,6 +15475,12 @@ public class DiagnosisCompilerTestFE10TestdataTestGenerated extends AbstractDiag runTest("compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/kt48935_6.kt"); } + @Test + @TestMetadata("kt48987.kt") + public void testKt48987() throws Exception { + runTest("compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/kt48987.kt"); + } + @Test @TestMetadata("kt49661.kt") public void testKt49661() throws Exception { diff --git a/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirOldFrontendDiagnosticsTestGenerated.java b/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirOldFrontendDiagnosticsTestGenerated.java index f27afecc955..056e1c5ac7d 100644 --- a/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirOldFrontendDiagnosticsTestGenerated.java +++ b/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirOldFrontendDiagnosticsTestGenerated.java @@ -15217,18 +15217,6 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti runTest("compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/compatibilityResolveWhenVariableHasComplexIntersectionType.kt"); } - @Test - @TestMetadata("intersectionTypeToFunInterfaceConversion.kt") - public void testIntersectionTypeToFunInterfaceConversion() throws Exception { - runTest("compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/intersectionTypeToFunInterfaceConversion.kt"); - } - - @Test - @TestMetadata("intersectionTypeToSubtypeConversion.kt") - public void testIntersectionTypeToSubtypeConversion() throws Exception { - runTest("compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/intersectionTypeToSubtypeConversion.kt"); - } - @Test @TestMetadata("kt45461.kt") public void testKt45461() throws Exception { diff --git a/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirOldFrontendDiagnosticsWithLightTreeTestGenerated.java b/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirOldFrontendDiagnosticsWithLightTreeTestGenerated.java index 6ce6eb6aadf..31ba7d7d650 100644 --- a/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirOldFrontendDiagnosticsWithLightTreeTestGenerated.java +++ b/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirOldFrontendDiagnosticsWithLightTreeTestGenerated.java @@ -15217,18 +15217,6 @@ public class FirOldFrontendDiagnosticsWithLightTreeTestGenerated extends Abstrac runTest("compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/compatibilityResolveWhenVariableHasComplexIntersectionType.kt"); } - @Test - @TestMetadata("intersectionTypeToFunInterfaceConversion.kt") - public void testIntersectionTypeToFunInterfaceConversion() throws Exception { - runTest("compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/intersectionTypeToFunInterfaceConversion.kt"); - } - - @Test - @TestMetadata("intersectionTypeToSubtypeConversion.kt") - public void testIntersectionTypeToSubtypeConversion() throws Exception { - runTest("compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/intersectionTypeToSubtypeConversion.kt"); - } - @Test @TestMetadata("kt45461.kt") public void testKt45461() throws Exception { 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 3cddc843d46..a69ab7ff007 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 @@ -12560,6 +12560,12 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/coroutines/suspendConversion"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test + @TestMetadata("intersectionTypeToSubtypeConversion.kt") + public void testIntersectionTypeToSubtypeConversion() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/suspendConversion/intersectionTypeToSubtypeConversion.kt"); + } + @Test @TestMetadata("onArgument.kt") public void testOnArgument() throws Exception { @@ -17571,6 +17577,12 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT runTest("compiler/testData/codegen/box/funInterface/inlinedSamWrapper.kt"); } + @Test + @TestMetadata("intersectionTypeToFunInterfaceConversion.kt") + public void testIntersectionTypeToFunInterfaceConversion() throws Exception { + runTest("compiler/testData/codegen/box/funInterface/intersectionTypeToFunInterfaceConversion.kt"); + } + @Test @TestMetadata("irrelevantPrivateDeclarations.kt") public void testIrrelevantPrivateDeclarations() throws Exception { diff --git a/compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/intersectionTypeToSubtypeConversion.kt b/compiler/testData/codegen/box/coroutines/suspendConversion/intersectionTypeToSubtypeConversion.kt similarity index 90% rename from compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/intersectionTypeToSubtypeConversion.kt rename to compiler/testData/codegen/box/coroutines/suspendConversion/intersectionTypeToSubtypeConversion.kt index 81db31612e9..2e61031ac67 100644 --- a/compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/intersectionTypeToSubtypeConversion.kt +++ b/compiler/testData/codegen/box/coroutines/suspendConversion/intersectionTypeToSubtypeConversion.kt @@ -32,7 +32,7 @@ class Test : () -> String, (Int) -> String { fun box(): String { var test = "Failed" builder { - test = testIntersection(Test()) + test = testIntersection(Test()) } if (test != "OKEmptyOK42") return "failed: $test" diff --git a/compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/intersectionTypeToFunInterfaceConversion.kt b/compiler/testData/codegen/box/funInterface/intersectionTypeToFunInterfaceConversion.kt similarity index 89% rename from compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/intersectionTypeToFunInterfaceConversion.kt rename to compiler/testData/codegen/box/funInterface/intersectionTypeToFunInterfaceConversion.kt index f99a1184eb7..ceac246720a 100644 --- a/compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/intersectionTypeToFunInterfaceConversion.kt +++ b/compiler/testData/codegen/box/funInterface/intersectionTypeToFunInterfaceConversion.kt @@ -36,6 +36,6 @@ object Test : () -> Unit, (Boolean) -> Unit { } fun box(): String { - testIntersection(Test) + testIntersection(Test) return result } \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/intersectionTypeToFunInterfaceConversion.fir.kt b/compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/intersectionTypeToFunInterfaceConversion.fir.kt deleted file mode 100644 index 9898eddfcd9..00000000000 --- a/compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/intersectionTypeToFunInterfaceConversion.fir.kt +++ /dev/null @@ -1,41 +0,0 @@ -// IGNORE_BACKEND: WASM -// WASM_MUTE_REASON: IGNORED_IN_JS -// IGNORE_BACKEND: JS, JS_IR -// IGNORE_BACKEND: JS_IR_ES6 - -fun interface KRunnable { - fun invoke() -} - -fun interface KBoolean { - fun invoke(b: Boolean) -} - -fun useFunInterface(fn: KRunnable) { - fn.invoke() -} -fun useFunInterfacePredicate(fn: KBoolean) { - fn.invoke(true) -} - -fun testIntersection(x: T) where T : () -> Unit, T : (Boolean) -> Unit { - useFunInterface(x) - useFunInterfacePredicate(x) -} - -var result = "" - -object Test : () -> Unit, (Boolean) -> Unit { - override fun invoke() { - result += "O" - } - - override fun invoke(p1: Boolean) { - if (p1) result += "K" - } -} - -fun box(): String { - testIntersection(Test) - return result -} \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/intersectionTypeToFunInterfaceConversion.txt b/compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/intersectionTypeToFunInterfaceConversion.txt deleted file mode 100644 index 3fc145553f9..00000000000 --- a/compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/intersectionTypeToFunInterfaceConversion.txt +++ /dev/null @@ -1,30 +0,0 @@ -package - -public var result: kotlin.String -public fun box(): kotlin.String -public fun kotlin.Unit> testIntersection(/*0*/ x: T): kotlin.Unit where T : (kotlin.Boolean) -> kotlin.Unit -public fun useFunInterface(/*0*/ fn: KRunnable): kotlin.Unit -public fun useFunInterfacePredicate(/*0*/ fn: KBoolean): kotlin.Unit - -public fun interface KBoolean { - public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean - public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int - public abstract fun invoke(/*0*/ b: kotlin.Boolean): kotlin.Unit - public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String -} - -public fun interface KRunnable { - public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean - public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int - public abstract fun invoke(): kotlin.Unit - public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String -} - -public object Test : () -> kotlin.Unit, (kotlin.Boolean) -> kotlin.Unit { - private constructor Test() - public open override /*2*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean - public open override /*2*/ /*fake_override*/ fun hashCode(): kotlin.Int - public open override /*1*/ fun invoke(): kotlin.Unit - public open override /*1*/ fun invoke(/*0*/ p1: kotlin.Boolean): kotlin.Unit - public open override /*2*/ /*fake_override*/ fun toString(): kotlin.String -} diff --git a/compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/intersectionTypeToSubtypeConversion.fir.kt b/compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/intersectionTypeToSubtypeConversion.fir.kt deleted file mode 100644 index 21eadedeee3..00000000000 --- a/compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/intersectionTypeToSubtypeConversion.fir.kt +++ /dev/null @@ -1,41 +0,0 @@ -// !LANGUAGE: +SuspendConversion -// WITH_STDLIB -// WITH_COROUTINES -// IGNORE_BACKEND: JVM, NATIVE, JS, JS_IR -// IGNORE_BACKEND: JS_IR_ES6 -// IGNORE_LIGHT_ANALYSIS -// IGNORE_BACKEND: WASM -// WASM_MUTE_REASON: IGNORED_IN_JS - -import helpers.* -import kotlin.coroutines.* -import kotlin.coroutines.intrinsics.* - -fun builder(c: suspend () -> Unit) { - c.startCoroutine(EmptyContinuation) -} - -suspend fun useSuspendFun(fn : suspend () -> String) = fn() -suspend fun useSuspendFunInt(fn: suspend (Int) -> String) = fn(42) - -suspend fun testIntersection(x: T): String where T : () -> String, T : (Int) -> String { - val a = useSuspendFun(x) - val b = useSuspendFunInt(x) - return a + b -} - -class Test : () -> String, (Int) -> String { - override fun invoke(): String = "OKEmpty" - override fun invoke(p: Int) = "OK$p" -} - -fun box(): String { - var test = "Failed" - builder { - test = testIntersection(Test()) - } - - if (test != "OKEmptyOK42") return "failed: $test" - - return "OK" -} \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/intersectionTypeToSubtypeConversion.txt b/compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/intersectionTypeToSubtypeConversion.txt deleted file mode 100644 index 566d6006e75..00000000000 --- a/compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/intersectionTypeToSubtypeConversion.txt +++ /dev/null @@ -1,16 +0,0 @@ -package - -public fun box(): kotlin.String -public fun builder(/*0*/ c: suspend () -> kotlin.Unit): kotlin.Unit -public suspend fun kotlin.String> testIntersection(/*0*/ x: T): kotlin.String where T : (kotlin.Int) -> kotlin.String -public suspend fun useSuspendFun(/*0*/ fn: suspend () -> kotlin.String): kotlin.String -public suspend fun useSuspendFunInt(/*0*/ fn: suspend (kotlin.Int) -> kotlin.String): kotlin.String - -public final class Test : () -> kotlin.String, (kotlin.Int) -> kotlin.String { - public constructor Test() - public open override /*2*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean - public open override /*2*/ /*fake_override*/ fun hashCode(): kotlin.Int - public open override /*1*/ fun invoke(): kotlin.String - public open override /*1*/ fun invoke(/*0*/ p: kotlin.Int): kotlin.String - public open override /*2*/ /*fake_override*/ fun toString(): kotlin.String -} diff --git a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/DiagnosticTestGenerated.java b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/DiagnosticTestGenerated.java index ac2d507833d..acf14e186fd 100644 --- a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/DiagnosticTestGenerated.java +++ b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/DiagnosticTestGenerated.java @@ -15223,18 +15223,6 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { runTest("compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/compatibilityResolveWhenVariableHasComplexIntersectionType.kt"); } - @Test - @TestMetadata("intersectionTypeToFunInterfaceConversion.kt") - public void testIntersectionTypeToFunInterfaceConversion() throws Exception { - runTest("compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/intersectionTypeToFunInterfaceConversion.kt"); - } - - @Test - @TestMetadata("intersectionTypeToSubtypeConversion.kt") - public void testIntersectionTypeToSubtypeConversion() throws Exception { - runTest("compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/intersectionTypeToSubtypeConversion.kt"); - } - @Test @TestMetadata("kt45461.kt") public void testKt45461() throws Exception { 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 16b568ae00e..32d6398d5a8 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 @@ -12440,6 +12440,12 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/coroutines/suspendConversion"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } + @Test + @TestMetadata("intersectionTypeToSubtypeConversion.kt") + public void testIntersectionTypeToSubtypeConversion() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/suspendConversion/intersectionTypeToSubtypeConversion.kt"); + } + @Test @TestMetadata("onArgument.kt") public void testOnArgument() throws Exception { @@ -17145,6 +17151,12 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { runTest("compiler/testData/codegen/box/funInterface/inlinedSamWrapper.kt"); } + @Test + @TestMetadata("intersectionTypeToFunInterfaceConversion.kt") + public void testIntersectionTypeToFunInterfaceConversion() throws Exception { + runTest("compiler/testData/codegen/box/funInterface/intersectionTypeToFunInterfaceConversion.kt"); + } + @Test @TestMetadata("irrelevantPrivateDeclarations.kt") public void testIrrelevantPrivateDeclarations() 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 5042c482e5a..1c8d333a4bf 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 @@ -12560,6 +12560,12 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/coroutines/suspendConversion"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test + @TestMetadata("intersectionTypeToSubtypeConversion.kt") + public void testIntersectionTypeToSubtypeConversion() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/suspendConversion/intersectionTypeToSubtypeConversion.kt"); + } + @Test @TestMetadata("onArgument.kt") public void testOnArgument() throws Exception { @@ -17571,6 +17577,12 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes runTest("compiler/testData/codegen/box/funInterface/inlinedSamWrapper.kt"); } + @Test + @TestMetadata("intersectionTypeToFunInterfaceConversion.kt") + public void testIntersectionTypeToFunInterfaceConversion() throws Exception { + runTest("compiler/testData/codegen/box/funInterface/intersectionTypeToFunInterfaceConversion.kt"); + } + @Test @TestMetadata("irrelevantPrivateDeclarations.kt") public void testIrrelevantPrivateDeclarations() 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 941b8f2b742..37afdd40688 100644 --- a/compiler/tests-gen/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java +++ b/compiler/tests-gen/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java @@ -10011,6 +10011,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class SuspendConversion extends AbstractLightAnalysisModeTest { + @TestMetadata("intersectionTypeToSubtypeConversion.kt") + public void ignoreIntersectionTypeToSubtypeConversion() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/suspendConversion/intersectionTypeToSubtypeConversion.kt"); + } + @TestMetadata("onArgument.kt") public void ignoreOnArgument() throws Exception { runTest("compiler/testData/codegen/box/coroutines/suspendConversion/onArgument.kt"); @@ -14211,6 +14216,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes runTest("compiler/testData/codegen/box/funInterface/inlinedSamWrapper.kt"); } + @TestMetadata("intersectionTypeToFunInterfaceConversion.kt") + public void testIntersectionTypeToFunInterfaceConversion() throws Exception { + runTest("compiler/testData/codegen/box/funInterface/intersectionTypeToFunInterfaceConversion.kt"); + } + @TestMetadata("irrelevantPrivateDeclarations.kt") public void testIrrelevantPrivateDeclarations() throws Exception { runTest("compiler/testData/codegen/box/funInterface/irrelevantPrivateDeclarations.kt"); diff --git a/core/compiler.common/src/org/jetbrains/kotlin/types/model/TypeSystemContext.kt b/core/compiler.common/src/org/jetbrains/kotlin/types/model/TypeSystemContext.kt index a651bd1723d..b5ebf47ea13 100644 --- a/core/compiler.common/src/org/jetbrains/kotlin/types/model/TypeSystemContext.kt +++ b/core/compiler.common/src/org/jetbrains/kotlin/types/model/TypeSystemContext.kt @@ -359,8 +359,13 @@ interface TypeSystemInferenceExtensionContext : TypeSystemContext, TypeSystemBui // B & C can't have common subtype due to having incompatible supertypes: A and A val haveIncompatibleSupertypes = firstType.anySuperTypeConstructor { superTypeOfFirst -> secondType.anySuperTypeConstructor { superTypeOfSecond -> + val erasedSuperTypeOfSecond by lazy { superTypeOfSecond.eraseContainingTypeParameters() } superTypeOfFirst.typeConstructor() == superTypeOfSecond.typeConstructor() - && !AbstractTypeChecker.equalTypes(this, superTypeOfFirst, superTypeOfSecond) + && !AbstractTypeChecker.equalTypes( + context = this, + superTypeOfFirst.eraseContainingTypeParameters(), + erasedSuperTypeOfSecond + ) } } 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 19879f6b1a3..34430f46825 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 @@ -9310,6 +9310,12 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/coroutines/suspendConversion"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS, true); } + @Test + @TestMetadata("intersectionTypeToSubtypeConversion.kt") + public void testIntersectionTypeToSubtypeConversion() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/suspendConversion/intersectionTypeToSubtypeConversion.kt"); + } + @Test @TestMetadata("onArgument.kt") public void testOnArgument() throws Exception { @@ -13205,6 +13211,12 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { runTest("compiler/testData/codegen/box/funInterface/inlinedSamWrapper.kt"); } + @Test + @TestMetadata("intersectionTypeToFunInterfaceConversion.kt") + public void testIntersectionTypeToFunInterfaceConversion() throws Exception { + runTest("compiler/testData/codegen/box/funInterface/intersectionTypeToFunInterfaceConversion.kt"); + } + @Test @TestMetadata("irrelevantPrivateDeclarations.kt") public void testIrrelevantPrivateDeclarations() 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 3f0c1bb5c51..9ca64771247 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 @@ -9352,6 +9352,12 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/coroutines/suspendConversion"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true); } + @Test + @TestMetadata("intersectionTypeToSubtypeConversion.kt") + public void testIntersectionTypeToSubtypeConversion() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/suspendConversion/intersectionTypeToSubtypeConversion.kt"); + } + @Test @TestMetadata("onArgument.kt") public void testOnArgument() throws Exception { @@ -13247,6 +13253,12 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest { runTest("compiler/testData/codegen/box/funInterface/inlinedSamWrapper.kt"); } + @Test + @TestMetadata("intersectionTypeToFunInterfaceConversion.kt") + public void testIntersectionTypeToFunInterfaceConversion() throws Exception { + runTest("compiler/testData/codegen/box/funInterface/intersectionTypeToFunInterfaceConversion.kt"); + } + @Test @TestMetadata("irrelevantPrivateDeclarations.kt") public void testIrrelevantPrivateDeclarations() 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 016cc50cb73..4f6537f41fa 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 @@ -8161,6 +8161,11 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/coroutines/suspendConversion"), Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.WASM, true); } + @TestMetadata("intersectionTypeToSubtypeConversion.kt") + public void testIntersectionTypeToSubtypeConversion() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/suspendConversion/intersectionTypeToSubtypeConversion.kt"); + } + @TestMetadata("onArgument.kt") public void testOnArgument() throws Exception { runTest("compiler/testData/codegen/box/coroutines/suspendConversion/onArgument.kt"); @@ -11078,6 +11083,11 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest runTest("compiler/testData/codegen/box/funInterface/inlinedSamWrapper.kt"); } + @TestMetadata("intersectionTypeToFunInterfaceConversion.kt") + public void testIntersectionTypeToFunInterfaceConversion() throws Exception { + runTest("compiler/testData/codegen/box/funInterface/intersectionTypeToFunInterfaceConversion.kt"); + } + @TestMetadata("irrelevantPrivateDeclarations.kt") public void testIrrelevantPrivateDeclarations() throws Exception { runTest("compiler/testData/codegen/box/funInterface/irrelevantPrivateDeclarations.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 33980891d1e..f688fe8bc61 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 @@ -10248,6 +10248,12 @@ public class NativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTest KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/coroutines/suspendConversion"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.NATIVE, true); } + @Test + @TestMetadata("intersectionTypeToSubtypeConversion.kt") + public void testIntersectionTypeToSubtypeConversion() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/suspendConversion/intersectionTypeToSubtypeConversion.kt"); + } + @Test @TestMetadata("onArgument.kt") public void testOnArgument() throws Exception { @@ -14257,6 +14263,12 @@ public class NativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTest runTest("compiler/testData/codegen/box/funInterface/inlinedSamWrapper.kt"); } + @Test + @TestMetadata("intersectionTypeToFunInterfaceConversion.kt") + public void testIntersectionTypeToFunInterfaceConversion() throws Exception { + runTest("compiler/testData/codegen/box/funInterface/intersectionTypeToFunInterfaceConversion.kt"); + } + @Test @TestMetadata("irrelevantPrivateDeclarations.kt") public void testIrrelevantPrivateDeclarations() throws Exception {