From ae9c9b051fd87f561f1dba841e768e83c872621f Mon Sep 17 00:00:00 2001 From: Dmitrii Gridin Date: Tue, 5 Mar 2024 17:00:41 +0100 Subject: [PATCH] [FIR] do not use MUTE_LL_FIR for multiplatform tests --- .../manyImplMemberNotImplemented.fir.kt | 3 -- .../scopes/manyImplMemberNotImplemented.kt | 3 -- .../scopes/manyImplMemberNotImplemented.ll.kt | 49 +++++++++++++++++++ .../manyInterfacesMemberNotImplemented.fir.kt | 3 -- .../manyInterfacesMemberNotImplemented.kt | 3 -- .../manyInterfacesMemberNotImplemented.ll.kt | 24 +++++++++ .../mixedFunctionalTypesInSupertypes.fir.kt | 3 -- .../mixedFunctionalTypesInSupertypes.kt | 3 -- .../mixedFunctionalTypesInSupertypes.ll.kt | 22 +++++++++ .../scopes/scopeOfFunInterface.fir.kt | 3 -- .../scopes/scopeOfFunInterface.kt | 3 -- .../scopes/scopeOfFunInterface.ll.kt | 16 ++++++ 12 files changed, 111 insertions(+), 24 deletions(-) create mode 100644 compiler/testData/diagnostics/tests/multiplatform/scopes/manyImplMemberNotImplemented.ll.kt create mode 100644 compiler/testData/diagnostics/tests/multiplatform/scopes/manyInterfacesMemberNotImplemented.ll.kt create mode 100644 compiler/testData/diagnostics/tests/multiplatform/scopes/mixedFunctionalTypesInSupertypes.ll.kt create mode 100644 compiler/testData/diagnostics/tests/multiplatform/scopes/scopeOfFunInterface.ll.kt diff --git a/compiler/testData/diagnostics/tests/multiplatform/scopes/manyImplMemberNotImplemented.fir.kt b/compiler/testData/diagnostics/tests/multiplatform/scopes/manyImplMemberNotImplemented.fir.kt index b52fbc5d02a..4c9046cee35 100644 --- a/compiler/testData/diagnostics/tests/multiplatform/scopes/manyImplMemberNotImplemented.fir.kt +++ b/compiler/testData/diagnostics/tests/multiplatform/scopes/manyImplMemberNotImplemented.fir.kt @@ -1,8 +1,5 @@ // TARGET_BACKEND: JVM // LANGUAGE: +MultiPlatformProjects -// MUTE_LL_FIR -// Reason: MPP diagnostics are reported differentely in the compiler and AA - // MODULE: m1-common // FILE: common.kt diff --git a/compiler/testData/diagnostics/tests/multiplatform/scopes/manyImplMemberNotImplemented.kt b/compiler/testData/diagnostics/tests/multiplatform/scopes/manyImplMemberNotImplemented.kt index 5df1cdb671f..e535e8ec119 100644 --- a/compiler/testData/diagnostics/tests/multiplatform/scopes/manyImplMemberNotImplemented.kt +++ b/compiler/testData/diagnostics/tests/multiplatform/scopes/manyImplMemberNotImplemented.kt @@ -1,8 +1,5 @@ // TARGET_BACKEND: JVM // LANGUAGE: +MultiPlatformProjects -// MUTE_LL_FIR -// Reason: MPP diagnostics are reported differentely in the compiler and AA - // MODULE: m1-common // FILE: common.kt diff --git a/compiler/testData/diagnostics/tests/multiplatform/scopes/manyImplMemberNotImplemented.ll.kt b/compiler/testData/diagnostics/tests/multiplatform/scopes/manyImplMemberNotImplemented.ll.kt new file mode 100644 index 00000000000..5f9469f18a1 --- /dev/null +++ b/compiler/testData/diagnostics/tests/multiplatform/scopes/manyImplMemberNotImplemented.ll.kt @@ -0,0 +1,49 @@ +// TARGET_BACKEND: JVM +// LANGUAGE: +MultiPlatformProjects +// MODULE: m1-common +// FILE: common.kt + +expect open class C1() +expect interface I1 + +open class Common1_1 : C1(), I1 +open class Common1_2 : I1, C1() + +expect open class Expect1_1 : C1, I1 +expect open class Expect1_2 : I1, C1 + + +expect abstract class C2() +expect interface I2 + +open class Common2_1 : C2(), I2 +open class Common2_2 : I2, C2() + +expect open class Expect2_1 : C2, I2 +expect open class Expect2_2 : I2, C2 + +// MODULE: m1-jvm()()(m1-common) +// FILE: main.kt + +actual open class C1 { + fun f() {} +} + +actual interface I1 { + fun f() {} +} + +actual open class Expect1_1 : C1(), I1 +actual open class Expect1_2 : I1, C1() + + +actual abstract class C2 actual constructor() { + fun g() {} +} + +actual interface I2 { + fun g() +} + +actual open class Expect2_1 : C2(), I2 +actual open class Expect2_2 : I2, C2() diff --git a/compiler/testData/diagnostics/tests/multiplatform/scopes/manyInterfacesMemberNotImplemented.fir.kt b/compiler/testData/diagnostics/tests/multiplatform/scopes/manyInterfacesMemberNotImplemented.fir.kt index ad4581334fe..4f3f6e3327e 100644 --- a/compiler/testData/diagnostics/tests/multiplatform/scopes/manyInterfacesMemberNotImplemented.fir.kt +++ b/compiler/testData/diagnostics/tests/multiplatform/scopes/manyInterfacesMemberNotImplemented.fir.kt @@ -1,8 +1,5 @@ // TARGET_BACKEND: JVM // !LANGUAGE: +MultiPlatformProjects -// MUTE_LL_FIR -// Reason: MPP diagnostics are reported differentely in the compiler and AA - // MODULE: common // TARGET_PLATFORM: Common // FILE: common.kt diff --git a/compiler/testData/diagnostics/tests/multiplatform/scopes/manyInterfacesMemberNotImplemented.kt b/compiler/testData/diagnostics/tests/multiplatform/scopes/manyInterfacesMemberNotImplemented.kt index 5e4f92b7740..f2dee24cfb2 100644 --- a/compiler/testData/diagnostics/tests/multiplatform/scopes/manyInterfacesMemberNotImplemented.kt +++ b/compiler/testData/diagnostics/tests/multiplatform/scopes/manyInterfacesMemberNotImplemented.kt @@ -1,8 +1,5 @@ // TARGET_BACKEND: JVM // !LANGUAGE: +MultiPlatformProjects -// MUTE_LL_FIR -// Reason: MPP diagnostics are reported differentely in the compiler and AA - // MODULE: common // TARGET_PLATFORM: Common // FILE: common.kt diff --git a/compiler/testData/diagnostics/tests/multiplatform/scopes/manyInterfacesMemberNotImplemented.ll.kt b/compiler/testData/diagnostics/tests/multiplatform/scopes/manyInterfacesMemberNotImplemented.ll.kt new file mode 100644 index 00000000000..fbb8a294050 --- /dev/null +++ b/compiler/testData/diagnostics/tests/multiplatform/scopes/manyInterfacesMemberNotImplemented.ll.kt @@ -0,0 +1,24 @@ +// TARGET_BACKEND: JVM +// !LANGUAGE: +MultiPlatformProjects +// MODULE: common +// TARGET_PLATFORM: Common +// FILE: common.kt + +expect interface S1 +expect interface S2 + +open class A : S1, S2 + +class B : A() + +// MODULE: jvm()()(common) +// TARGET_PLATFORM: JVM +// FILE: main.kt + +actual interface S1 { + fun f() {} +} + +actual interface S2 { + fun f() {} +} diff --git a/compiler/testData/diagnostics/tests/multiplatform/scopes/mixedFunctionalTypesInSupertypes.fir.kt b/compiler/testData/diagnostics/tests/multiplatform/scopes/mixedFunctionalTypesInSupertypes.fir.kt index 89dc69a1e81..260c3b95e90 100644 --- a/compiler/testData/diagnostics/tests/multiplatform/scopes/mixedFunctionalTypesInSupertypes.fir.kt +++ b/compiler/testData/diagnostics/tests/multiplatform/scopes/mixedFunctionalTypesInSupertypes.fir.kt @@ -1,7 +1,4 @@ // LANGUAGE: +MultiPlatformProjects -// MUTE_LL_FIR -// Reason: MPP diagnostics are reported differentely in the compiler and AA - // MODULE: common // FILE: common.kt expect interface I1 { diff --git a/compiler/testData/diagnostics/tests/multiplatform/scopes/mixedFunctionalTypesInSupertypes.kt b/compiler/testData/diagnostics/tests/multiplatform/scopes/mixedFunctionalTypesInSupertypes.kt index 2addf960507..4d6c021389a 100644 --- a/compiler/testData/diagnostics/tests/multiplatform/scopes/mixedFunctionalTypesInSupertypes.kt +++ b/compiler/testData/diagnostics/tests/multiplatform/scopes/mixedFunctionalTypesInSupertypes.kt @@ -1,7 +1,4 @@ // LANGUAGE: +MultiPlatformProjects -// MUTE_LL_FIR -// Reason: MPP diagnostics are reported differentely in the compiler and AA - // MODULE: common // FILE: common.kt expect interface I1 { diff --git a/compiler/testData/diagnostics/tests/multiplatform/scopes/mixedFunctionalTypesInSupertypes.ll.kt b/compiler/testData/diagnostics/tests/multiplatform/scopes/mixedFunctionalTypesInSupertypes.ll.kt new file mode 100644 index 00000000000..260f2b4fb8d --- /dev/null +++ b/compiler/testData/diagnostics/tests/multiplatform/scopes/mixedFunctionalTypesInSupertypes.ll.kt @@ -0,0 +1,22 @@ +// LANGUAGE: +MultiPlatformProjects +// MODULE: common +// FILE: common.kt +expect interface I1 { + fun invoke(): R +} + +expect interface I2 { + suspend fun invoke(): R +} + +expect interface ExpectInterface : I1, I2 + +interface CommonInterface : I1, I2 + +// MODULE: jvm()()(common) +// FILE: main.kt + +actual typealias I1 = () -> R +actual typealias I2 = suspend () -> R + +actual interface ExpectInterface : I1, I2 diff --git a/compiler/testData/diagnostics/tests/multiplatform/scopes/scopeOfFunInterface.fir.kt b/compiler/testData/diagnostics/tests/multiplatform/scopes/scopeOfFunInterface.fir.kt index 3f657cbdb3c..42594881b86 100644 --- a/compiler/testData/diagnostics/tests/multiplatform/scopes/scopeOfFunInterface.fir.kt +++ b/compiler/testData/diagnostics/tests/multiplatform/scopes/scopeOfFunInterface.fir.kt @@ -1,8 +1,5 @@ // LANGUAGE: +MultiPlatformProjects // ISSUE: KT-58845 -// MUTE_LL_FIR -// Reason: MPP diagnostics are reported differentely in the compiler and AA - // MODULE: common // FILE: common.kt expect interface I diff --git a/compiler/testData/diagnostics/tests/multiplatform/scopes/scopeOfFunInterface.kt b/compiler/testData/diagnostics/tests/multiplatform/scopes/scopeOfFunInterface.kt index 3844aa66b4a..fb5f6351e25 100644 --- a/compiler/testData/diagnostics/tests/multiplatform/scopes/scopeOfFunInterface.kt +++ b/compiler/testData/diagnostics/tests/multiplatform/scopes/scopeOfFunInterface.kt @@ -1,8 +1,5 @@ // LANGUAGE: +MultiPlatformProjects // ISSUE: KT-58845 -// MUTE_LL_FIR -// Reason: MPP diagnostics are reported differentely in the compiler and AA - // MODULE: common // FILE: common.kt expect interface I diff --git a/compiler/testData/diagnostics/tests/multiplatform/scopes/scopeOfFunInterface.ll.kt b/compiler/testData/diagnostics/tests/multiplatform/scopes/scopeOfFunInterface.ll.kt new file mode 100644 index 00000000000..dd87c784b09 --- /dev/null +++ b/compiler/testData/diagnostics/tests/multiplatform/scopes/scopeOfFunInterface.ll.kt @@ -0,0 +1,16 @@ +// LANGUAGE: +MultiPlatformProjects +// ISSUE: KT-58845 +// MODULE: common +// FILE: common.kt +expect interface I + +fun interface F : I { + fun foo() +} + +// MODULE: jvm()()(common) +// FILE: main.kt + +actual interface I { + fun bar() +}