[FE 1.0] 2/2 Drop AllowDifferentMembersInActual from compiler and testData
The annotation was dropped in the previous commit
This commit is contained in:
-12
@@ -382,18 +382,6 @@ public class FirOldFrontendMPPDiagnosticsWithLightTreeTestGenerated extends Abst
|
|||||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/multiplatform/actualClassifierMustHasTheSameMembersAsNonFinalExpectClassifierChecker"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.(reversed|fir|ll)\\.kts?$"), TargetBackend.JVM_IR, true);
|
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/multiplatform/actualClassifierMustHasTheSameMembersAsNonFinalExpectClassifierChecker"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.(reversed|fir|ll)\\.kts?$"), TargetBackend.JVM_IR, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
|
||||||
@TestMetadata("allowDifferentMembersInActual_class.kt")
|
|
||||||
public void testAllowDifferentMembersInActual_class() throws Exception {
|
|
||||||
runTest("compiler/testData/diagnostics/tests/multiplatform/actualClassifierMustHasTheSameMembersAsNonFinalExpectClassifierChecker/allowDifferentMembersInActual_class.kt");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
|
||||||
@TestMetadata("allowDifferentMembersInActual_typealias.kt")
|
|
||||||
public void testAllowDifferentMembersInActual_typealias() throws Exception {
|
|
||||||
runTest("compiler/testData/diagnostics/tests/multiplatform/actualClassifierMustHasTheSameMembersAsNonFinalExpectClassifierChecker/allowDifferentMembersInActual_typealias.kt");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("changeClassTypeParameterNames.kt")
|
@TestMetadata("changeClassTypeParameterNames.kt")
|
||||||
public void testChangeClassTypeParameterNames() throws Exception {
|
public void testChangeClassTypeParameterNames() throws Exception {
|
||||||
|
|||||||
-12
@@ -382,18 +382,6 @@ public class FirOldFrontendMPPDiagnosticsWithPsiTestGenerated extends AbstractFi
|
|||||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/multiplatform/actualClassifierMustHasTheSameMembersAsNonFinalExpectClassifierChecker"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.(reversed|fir|ll)\\.kts?$"), TargetBackend.JVM_IR, true);
|
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/multiplatform/actualClassifierMustHasTheSameMembersAsNonFinalExpectClassifierChecker"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.(reversed|fir|ll)\\.kts?$"), TargetBackend.JVM_IR, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
|
||||||
@TestMetadata("allowDifferentMembersInActual_class.kt")
|
|
||||||
public void testAllowDifferentMembersInActual_class() throws Exception {
|
|
||||||
runTest("compiler/testData/diagnostics/tests/multiplatform/actualClassifierMustHasTheSameMembersAsNonFinalExpectClassifierChecker/allowDifferentMembersInActual_class.kt");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
|
||||||
@TestMetadata("allowDifferentMembersInActual_typealias.kt")
|
|
||||||
public void testAllowDifferentMembersInActual_typealias() throws Exception {
|
|
||||||
runTest("compiler/testData/diagnostics/tests/multiplatform/actualClassifierMustHasTheSameMembersAsNonFinalExpectClassifierChecker/allowDifferentMembersInActual_typealias.kt");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("changeClassTypeParameterNames.kt")
|
@TestMetadata("changeClassTypeParameterNames.kt")
|
||||||
public void testChangeClassTypeParameterNames() throws Exception {
|
public void testChangeClassTypeParameterNames() throws Exception {
|
||||||
|
|||||||
-6
@@ -88,8 +88,6 @@ private fun checkExpectActualScopeDiff(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private val allowDifferentMembersInActualFqn = FqName("kotlin.AllowDifferentMembersInActual")
|
|
||||||
|
|
||||||
@OptIn(ExperimentalContracts::class)
|
@OptIn(ExperimentalContracts::class)
|
||||||
internal fun matchActualWithNonFinalExpect(
|
internal fun matchActualWithNonFinalExpect(
|
||||||
declaration: KtDeclaration,
|
declaration: KtDeclaration,
|
||||||
@@ -114,10 +112,6 @@ internal fun matchActualWithNonFinalExpect(
|
|||||||
|
|
||||||
if (!descriptor.isActual) return null
|
if (!descriptor.isActual) return null
|
||||||
|
|
||||||
with(OptInUsageChecker) {
|
|
||||||
if (declaration.isDeclarationAnnotatedWith(allowDifferentMembersInActualFqn, context.trace.bindingContext)) return null
|
|
||||||
}
|
|
||||||
|
|
||||||
val actual = when (descriptor) {
|
val actual = when (descriptor) {
|
||||||
is ClassDescriptor -> descriptor
|
is ClassDescriptor -> descriptor
|
||||||
is TypeAliasDescriptor -> descriptor.classDescriptor
|
is TypeAliasDescriptor -> descriptor.classDescriptor
|
||||||
|
|||||||
-2
@@ -21,8 +21,6 @@ actual interface I {
|
|||||||
actual fun test(source: String = "actual")
|
actual fun test(source: String = "actual")
|
||||||
}
|
}
|
||||||
|
|
||||||
@OptIn(ExperimentalMultiplatform::class)
|
|
||||||
@AllowDifferentMembersInActual
|
|
||||||
actual interface J : I {
|
actual interface J : I {
|
||||||
override fun test(source: String) {
|
override fun test(source: String) {
|
||||||
if (source != "actual") throw AssertionError(source)
|
if (source != "actual") throw AssertionError(source)
|
||||||
|
|||||||
@@ -25,8 +25,6 @@ fun getB(): B = B()
|
|||||||
|
|
||||||
// MODULE: main()()(intermediate)
|
// MODULE: main()()(intermediate)
|
||||||
// FILE: main.kt
|
// FILE: main.kt
|
||||||
@OptIn(ExperimentalMultiplatform::class)
|
|
||||||
@AllowDifferentMembersInActual
|
|
||||||
actual open class A actual constructor() {
|
actual open class A actual constructor() {
|
||||||
fun bar(): String = "K"
|
fun bar(): String = "K"
|
||||||
}
|
}
|
||||||
|
|||||||
-4
@@ -18,16 +18,12 @@ class B : A()
|
|||||||
// MODULE: platform()()(common)
|
// MODULE: platform()()(common)
|
||||||
// FILE: platform.kt
|
// FILE: platform.kt
|
||||||
|
|
||||||
@OptIn(ExperimentalMultiplatform::class)
|
|
||||||
@AllowDifferentMembersInActual
|
|
||||||
actual interface S1 {
|
actual interface S1 {
|
||||||
fun o(): S = "O"
|
fun o(): S = "O"
|
||||||
val p: Boolean
|
val p: Boolean
|
||||||
get() = true
|
get() = true
|
||||||
}
|
}
|
||||||
|
|
||||||
@OptIn(ExperimentalMultiplatform::class)
|
|
||||||
@AllowDifferentMembersInActual
|
|
||||||
actual interface S2 {
|
actual interface S2 {
|
||||||
fun k() = "K"
|
fun k() = "K"
|
||||||
}
|
}
|
||||||
|
|||||||
-6
@@ -19,8 +19,6 @@ class B : A()
|
|||||||
// MODULE: platform()()(common)
|
// MODULE: platform()()(common)
|
||||||
// FILE: platform.kt
|
// FILE: platform.kt
|
||||||
|
|
||||||
@OptIn(ExperimentalMultiplatform::class)
|
|
||||||
@AllowDifferentMembersInActual
|
|
||||||
actual interface S1 {
|
actual interface S1 {
|
||||||
fun s1() = "O"
|
fun s1() = "O"
|
||||||
}
|
}
|
||||||
@@ -29,13 +27,9 @@ interface S20 {
|
|||||||
fun s2() = "K"
|
fun s2() = "K"
|
||||||
}
|
}
|
||||||
|
|
||||||
@OptIn(ExperimentalMultiplatform::class)
|
|
||||||
@AllowDifferentMembersInActual
|
|
||||||
actual interface S2 : S20 {
|
actual interface S2 : S20 {
|
||||||
}
|
}
|
||||||
|
|
||||||
@OptIn(ExperimentalMultiplatform::class)
|
|
||||||
@AllowDifferentMembersInActual
|
|
||||||
actual interface S : S1, S2 {
|
actual interface S : S1, S2 {
|
||||||
fun s3() = s1() + s2()
|
fun s3() = s1() + s2()
|
||||||
}
|
}
|
||||||
|
|||||||
-21
@@ -1,21 +0,0 @@
|
|||||||
// FIR_IDENTICAL
|
|
||||||
// WITH_STDLIB
|
|
||||||
// MODULE: m1-common
|
|
||||||
// FILE: common.kt
|
|
||||||
|
|
||||||
expect open class Foo {
|
|
||||||
fun existingMethod()
|
|
||||||
val existingParam: Int
|
|
||||||
}
|
|
||||||
|
|
||||||
// MODULE: m2-jvm()()(m1-common)
|
|
||||||
// FILE: jvm.kt
|
|
||||||
|
|
||||||
@OptIn(kotlin.ExperimentalMultiplatform::class)
|
|
||||||
@kotlin.AllowDifferentMembersInActual
|
|
||||||
actual open class Foo {
|
|
||||||
actual fun existingMethod() {}
|
|
||||||
actual val existingParam: Int = 904
|
|
||||||
|
|
||||||
fun injectedMethod() {} // accidential override can happen with this injected fun. That's why it's prohibited
|
|
||||||
}
|
|
||||||
-23
@@ -1,23 +0,0 @@
|
|||||||
// FIR_IDENTICAL
|
|
||||||
// WITH_STDLIB
|
|
||||||
// MODULE: m1-common
|
|
||||||
// FILE: common.kt
|
|
||||||
|
|
||||||
expect open class Foo {
|
|
||||||
fun existingMethod()
|
|
||||||
val existingParam: Int
|
|
||||||
}
|
|
||||||
|
|
||||||
// MODULE: m2-jvm()()(m1-common)
|
|
||||||
// FILE: jvm.kt
|
|
||||||
|
|
||||||
@OptIn(kotlin.ExperimentalMultiplatform::class)
|
|
||||||
@kotlin.AllowDifferentMembersInActual
|
|
||||||
actual typealias Foo = FooImpl
|
|
||||||
|
|
||||||
open class FooImpl {
|
|
||||||
fun existingMethod() {}
|
|
||||||
val existingParam: Int = 904
|
|
||||||
|
|
||||||
fun injectedMethod() {} // accidential override can happen with this injected fun. That's why it's prohibited
|
|
||||||
}
|
|
||||||
-2
@@ -14,8 +14,6 @@ expect open class Foo : Base {
|
|||||||
// MODULE: m2-jvm()()(m1-common)
|
// MODULE: m2-jvm()()(m1-common)
|
||||||
// FILE: jvm.kt
|
// FILE: jvm.kt
|
||||||
|
|
||||||
@OptIn(ExperimentalMultiplatform::class)
|
|
||||||
@AllowDifferentMembersInActual
|
|
||||||
actual open class Base {
|
actual open class Base {
|
||||||
actual fun existingMethodInBase() {}
|
actual fun existingMethodInBase() {}
|
||||||
open fun injected(): Any = ""
|
open fun injected(): Any = ""
|
||||||
|
|||||||
+2
-4
@@ -14,11 +14,9 @@ expect open class Foo : Base {
|
|||||||
// MODULE: m2-jvm()()(m1-common)
|
// MODULE: m2-jvm()()(m1-common)
|
||||||
// FILE: jvm.kt
|
// FILE: jvm.kt
|
||||||
|
|
||||||
@OptIn(ExperimentalMultiplatform::class)
|
actual open <!ACTUAL_CLASSIFIER_MUST_HAVE_THE_SAME_MEMBERS_AS_NON_FINAL_EXPECT_CLASSIFIER_WARNING!>class Base<!> {
|
||||||
@AllowDifferentMembersInActual
|
|
||||||
actual open class Base {
|
|
||||||
actual fun existingMethodInBase() {}
|
actual fun existingMethodInBase() {}
|
||||||
open fun injected(): Any = ""
|
open fun <!NON_ACTUAL_MEMBER_DECLARED_IN_EXPECT_NON_FINAL_CLASSIFIER_ACTUALIZATION_WARNING!>injected<!>(): Any = ""
|
||||||
}
|
}
|
||||||
|
|
||||||
actual open <!ACTUAL_CLASSIFIER_MUST_HAVE_THE_SAME_MEMBERS_AS_NON_FINAL_EXPECT_CLASSIFIER_WARNING!>class Foo<!> : Base() {
|
actual open <!ACTUAL_CLASSIFIER_MUST_HAVE_THE_SAME_MEMBERS_AS_NON_FINAL_EXPECT_CLASSIFIER_WARNING!>class Foo<!> : Base() {
|
||||||
|
|||||||
-2
@@ -16,8 +16,6 @@ expect open class Foo : Transitive {
|
|||||||
// MODULE: m2-jvm()()(m1-common)
|
// MODULE: m2-jvm()()(m1-common)
|
||||||
// FILE: jvm.kt
|
// FILE: jvm.kt
|
||||||
|
|
||||||
@OptIn(ExperimentalMultiplatform::class)
|
|
||||||
@AllowDifferentMembersInActual
|
|
||||||
actual open class Base<T> {
|
actual open class Base<T> {
|
||||||
actual fun existingMethodInBase(param: T) {}
|
actual fun existingMethodInBase(param: T) {}
|
||||||
open fun injected(param: T): Any = ""
|
open fun injected(param: T): Any = ""
|
||||||
|
|||||||
+2
-4
@@ -16,11 +16,9 @@ expect open class Foo : Transitive {
|
|||||||
// MODULE: m2-jvm()()(m1-common)
|
// MODULE: m2-jvm()()(m1-common)
|
||||||
// FILE: jvm.kt
|
// FILE: jvm.kt
|
||||||
|
|
||||||
@OptIn(ExperimentalMultiplatform::class)
|
actual open <!ACTUAL_CLASSIFIER_MUST_HAVE_THE_SAME_MEMBERS_AS_NON_FINAL_EXPECT_CLASSIFIER_WARNING!>class Base<!><T> {
|
||||||
@AllowDifferentMembersInActual
|
|
||||||
actual open class Base<T> {
|
|
||||||
actual fun existingMethodInBase(param: T) {}
|
actual fun existingMethodInBase(param: T) {}
|
||||||
open fun injected(param: T): Any = ""
|
open fun <!NON_ACTUAL_MEMBER_DECLARED_IN_EXPECT_NON_FINAL_CLASSIFIER_ACTUALIZATION_WARNING!>injected<!>(param: T): Any = ""
|
||||||
}
|
}
|
||||||
|
|
||||||
actual open <!ACTUAL_CLASSIFIER_MUST_HAVE_THE_SAME_MEMBERS_AS_NON_FINAL_EXPECT_CLASSIFIER_WARNING!>class Foo<!> : Transitive() {
|
actual open <!ACTUAL_CLASSIFIER_MUST_HAVE_THE_SAME_MEMBERS_AS_NON_FINAL_EXPECT_CLASSIFIER_WARNING!>class Foo<!> : Transitive() {
|
||||||
|
|||||||
+25
@@ -0,0 +1,25 @@
|
|||||||
|
// WITH_STDLIB
|
||||||
|
// MODULE: m1-common
|
||||||
|
// FILE: common.kt
|
||||||
|
|
||||||
|
expect open class Base {
|
||||||
|
fun existingMethodInBase()
|
||||||
|
}
|
||||||
|
|
||||||
|
expect open class Foo : Base {
|
||||||
|
fun existingMethod()
|
||||||
|
val existingParam: Int
|
||||||
|
}
|
||||||
|
|
||||||
|
// MODULE: m2-jvm()()(m1-common)
|
||||||
|
// FILE: jvm.kt
|
||||||
|
|
||||||
|
actual open class Base {
|
||||||
|
actual fun existingMethodInBase() {}
|
||||||
|
fun injected() {}
|
||||||
|
}
|
||||||
|
|
||||||
|
actual open class Foo : Base() {
|
||||||
|
actual fun existingMethod() {}
|
||||||
|
actual val existingParam: Int = 904
|
||||||
|
}
|
||||||
+2
-5
@@ -1,4 +1,3 @@
|
|||||||
// FIR_IDENTICAL
|
|
||||||
// WITH_STDLIB
|
// WITH_STDLIB
|
||||||
// MODULE: m1-common
|
// MODULE: m1-common
|
||||||
// FILE: common.kt
|
// FILE: common.kt
|
||||||
@@ -15,11 +14,9 @@ expect open class Foo : Base {
|
|||||||
// MODULE: m2-jvm()()(m1-common)
|
// MODULE: m2-jvm()()(m1-common)
|
||||||
// FILE: jvm.kt
|
// FILE: jvm.kt
|
||||||
|
|
||||||
@OptIn(ExperimentalMultiplatform::class)
|
actual open <!ACTUAL_CLASSIFIER_MUST_HAVE_THE_SAME_MEMBERS_AS_NON_FINAL_EXPECT_CLASSIFIER_WARNING!>class Base<!> {
|
||||||
@AllowDifferentMembersInActual
|
|
||||||
actual open class Base {
|
|
||||||
actual fun existingMethodInBase() {}
|
actual fun existingMethodInBase() {}
|
||||||
fun injected() {}
|
fun <!NON_ACTUAL_MEMBER_DECLARED_IN_EXPECT_NON_FINAL_CLASSIFIER_ACTUALIZATION_WARNING!>injected<!>() {}
|
||||||
}
|
}
|
||||||
|
|
||||||
actual open class Foo : Base() {
|
actual open class Foo : Base() {
|
||||||
|
|||||||
+27
@@ -0,0 +1,27 @@
|
|||||||
|
// WITH_STDLIB
|
||||||
|
// MODULE: m1-common
|
||||||
|
// FILE: common.kt
|
||||||
|
|
||||||
|
expect open class Base<T>() {
|
||||||
|
fun existingMethodInBase(param: T)
|
||||||
|
}
|
||||||
|
|
||||||
|
open class Transitive : Base<String>()
|
||||||
|
|
||||||
|
expect open class Foo : Transitive {
|
||||||
|
fun existingMethod()
|
||||||
|
val existingParam: Int
|
||||||
|
}
|
||||||
|
|
||||||
|
// MODULE: m2-jvm()()(m1-common)
|
||||||
|
// FILE: jvm.kt
|
||||||
|
|
||||||
|
actual open class Base<T> {
|
||||||
|
actual fun existingMethodInBase(param: T) {}
|
||||||
|
fun injected() {}
|
||||||
|
}
|
||||||
|
|
||||||
|
actual open class Foo : Transitive() {
|
||||||
|
actual fun existingMethod() {}
|
||||||
|
actual val existingParam: Int = 904
|
||||||
|
}
|
||||||
+2
-5
@@ -1,4 +1,3 @@
|
|||||||
// FIR_IDENTICAL
|
|
||||||
// WITH_STDLIB
|
// WITH_STDLIB
|
||||||
// MODULE: m1-common
|
// MODULE: m1-common
|
||||||
// FILE: common.kt
|
// FILE: common.kt
|
||||||
@@ -17,11 +16,9 @@ expect open class Foo : Transitive {
|
|||||||
// MODULE: m2-jvm()()(m1-common)
|
// MODULE: m2-jvm()()(m1-common)
|
||||||
// FILE: jvm.kt
|
// FILE: jvm.kt
|
||||||
|
|
||||||
@OptIn(ExperimentalMultiplatform::class)
|
actual open <!ACTUAL_CLASSIFIER_MUST_HAVE_THE_SAME_MEMBERS_AS_NON_FINAL_EXPECT_CLASSIFIER_WARNING!>class Base<!><T> {
|
||||||
@AllowDifferentMembersInActual
|
|
||||||
actual open class Base<T> {
|
|
||||||
actual fun existingMethodInBase(param: T) {}
|
actual fun existingMethodInBase(param: T) {}
|
||||||
fun injected() {}
|
fun <!NON_ACTUAL_MEMBER_DECLARED_IN_EXPECT_NON_FINAL_CLASSIFIER_ACTUALIZATION_WARNING!>injected<!>() {}
|
||||||
}
|
}
|
||||||
|
|
||||||
actual open class Foo : Transitive() {
|
actual open class Foo : Transitive() {
|
||||||
|
|||||||
+27
@@ -0,0 +1,27 @@
|
|||||||
|
// WITH_STDLIB
|
||||||
|
// MODULE: m1-common
|
||||||
|
// FILE: common.kt
|
||||||
|
|
||||||
|
expect open class Base() {
|
||||||
|
fun existingMethodInBase()
|
||||||
|
}
|
||||||
|
|
||||||
|
expect open class Foo : Base {
|
||||||
|
fun existingMethod()
|
||||||
|
val existingParam: Int
|
||||||
|
}
|
||||||
|
|
||||||
|
// MODULE: m2-jvm()()(m1-common)
|
||||||
|
// FILE: jvm.kt
|
||||||
|
|
||||||
|
actual typealias Base = BaseImpl
|
||||||
|
|
||||||
|
open class BaseImpl {
|
||||||
|
fun existingMethodInBase() {}
|
||||||
|
fun injected() {}
|
||||||
|
}
|
||||||
|
|
||||||
|
actual open class Foo : Base() {
|
||||||
|
actual fun existingMethod() {}
|
||||||
|
actual val existingParam: Int = 904
|
||||||
|
}
|
||||||
+1
-4
@@ -1,4 +1,3 @@
|
|||||||
// FIR_IDENTICAL
|
|
||||||
// WITH_STDLIB
|
// WITH_STDLIB
|
||||||
// MODULE: m1-common
|
// MODULE: m1-common
|
||||||
// FILE: common.kt
|
// FILE: common.kt
|
||||||
@@ -15,9 +14,7 @@ expect open class Foo : Base {
|
|||||||
// MODULE: m2-jvm()()(m1-common)
|
// MODULE: m2-jvm()()(m1-common)
|
||||||
// FILE: jvm.kt
|
// FILE: jvm.kt
|
||||||
|
|
||||||
@OptIn(ExperimentalMultiplatform::class)
|
actual typealias <!ACTUAL_CLASSIFIER_MUST_HAVE_THE_SAME_MEMBERS_AS_NON_FINAL_EXPECT_CLASSIFIER_WARNING!>Base<!> = BaseImpl
|
||||||
@AllowDifferentMembersInActual
|
|
||||||
actual typealias Base = BaseImpl
|
|
||||||
|
|
||||||
open class BaseImpl {
|
open class BaseImpl {
|
||||||
fun existingMethodInBase() {}
|
fun existingMethodInBase() {}
|
||||||
|
|||||||
+29
@@ -0,0 +1,29 @@
|
|||||||
|
// WITH_STDLIB
|
||||||
|
// MODULE: m1-common
|
||||||
|
// FILE: common.kt
|
||||||
|
|
||||||
|
expect open class Base<T>() {
|
||||||
|
fun existingMethodInBase(param: T)
|
||||||
|
}
|
||||||
|
|
||||||
|
open class Transitive : Base<String>()
|
||||||
|
|
||||||
|
expect open class Foo : Transitive {
|
||||||
|
fun existingMethod()
|
||||||
|
val existingParam: Int
|
||||||
|
}
|
||||||
|
|
||||||
|
// MODULE: m2-jvm()()(m1-common)
|
||||||
|
// FILE: jvm.kt
|
||||||
|
|
||||||
|
actual typealias Base<T> = BaseImpl<T>
|
||||||
|
|
||||||
|
open class BaseImpl<T> {
|
||||||
|
fun existingMethodInBase(param: T) {}
|
||||||
|
fun injected() {}
|
||||||
|
}
|
||||||
|
|
||||||
|
actual open class Foo : Transitive() {
|
||||||
|
actual fun existingMethod() {}
|
||||||
|
actual val existingParam: Int = 904
|
||||||
|
}
|
||||||
+1
-4
@@ -1,4 +1,3 @@
|
|||||||
// FIR_IDENTICAL
|
|
||||||
// WITH_STDLIB
|
// WITH_STDLIB
|
||||||
// MODULE: m1-common
|
// MODULE: m1-common
|
||||||
// FILE: common.kt
|
// FILE: common.kt
|
||||||
@@ -17,9 +16,7 @@ expect open class Foo : Transitive {
|
|||||||
// MODULE: m2-jvm()()(m1-common)
|
// MODULE: m2-jvm()()(m1-common)
|
||||||
// FILE: jvm.kt
|
// FILE: jvm.kt
|
||||||
|
|
||||||
@OptIn(ExperimentalMultiplatform::class)
|
actual typealias <!ACTUAL_CLASSIFIER_MUST_HAVE_THE_SAME_MEMBERS_AS_NON_FINAL_EXPECT_CLASSIFIER_WARNING!>Base<!><T> = BaseImpl<T>
|
||||||
@AllowDifferentMembersInActual
|
|
||||||
actual typealias Base<T> = BaseImpl<T>
|
|
||||||
|
|
||||||
open class BaseImpl<T> {
|
open class BaseImpl<T> {
|
||||||
fun existingMethodInBase(param: T) {}
|
fun existingMethodInBase(param: T) {}
|
||||||
|
|||||||
Vendored
-2
@@ -12,6 +12,4 @@
|
|||||||
|
|
||||||
import java.util.AbstractMap
|
import java.util.AbstractMap
|
||||||
|
|
||||||
@OptIn(kotlin.ExperimentalMultiplatform::class)
|
|
||||||
@kotlin.AllowDifferentMembersInActual
|
|
||||||
public actual abstract class AbstractMutableMap<K, V>() : MutableMap<K, V>, AbstractMap<K, V>()
|
public actual abstract class AbstractMutableMap<K, V>() : MutableMap<K, V>, AbstractMap<K, V>()
|
||||||
|
|||||||
Vendored
+1
-3
@@ -12,6 +12,4 @@ public expect abstract class AbstractMutableMap<K, V> : MutableMap<K, V> {
|
|||||||
|
|
||||||
import java.util.AbstractMap
|
import java.util.AbstractMap
|
||||||
|
|
||||||
@OptIn(kotlin.ExperimentalMultiplatform::class)
|
public actual abstract <!ACTUAL_CLASSIFIER_MUST_HAVE_THE_SAME_SUPERTYPES_AS_NON_FINAL_EXPECT_CLASSIFIER_WARNING!>class AbstractMutableMap<!><K, V>() : MutableMap<K, V>, AbstractMap<K, V>()
|
||||||
@kotlin.AllowDifferentMembersInActual
|
|
||||||
public actual abstract class AbstractMutableMap<K, V>() : MutableMap<K, V>, AbstractMap<K, V>()
|
|
||||||
|
|||||||
Generated
-12
@@ -23629,18 +23629,6 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest {
|
|||||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/multiplatform/actualClassifierMustHasTheSameMembersAsNonFinalExpectClassifierChecker"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.(reversed|fir|ll)\\.kts?$"), true);
|
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/multiplatform/actualClassifierMustHasTheSameMembersAsNonFinalExpectClassifierChecker"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.(reversed|fir|ll)\\.kts?$"), true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
|
||||||
@TestMetadata("allowDifferentMembersInActual_class.kt")
|
|
||||||
public void testAllowDifferentMembersInActual_class() throws Exception {
|
|
||||||
runTest("compiler/testData/diagnostics/tests/multiplatform/actualClassifierMustHasTheSameMembersAsNonFinalExpectClassifierChecker/allowDifferentMembersInActual_class.kt");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
|
||||||
@TestMetadata("allowDifferentMembersInActual_typealias.kt")
|
|
||||||
public void testAllowDifferentMembersInActual_typealias() throws Exception {
|
|
||||||
runTest("compiler/testData/diagnostics/tests/multiplatform/actualClassifierMustHasTheSameMembersAsNonFinalExpectClassifierChecker/allowDifferentMembersInActual_typealias.kt");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("changeClassTypeParameterNames.kt")
|
@TestMetadata("changeClassTypeParameterNames.kt")
|
||||||
public void testChangeClassTypeParameterNames() throws Exception {
|
public void testChangeClassTypeParameterNames() throws Exception {
|
||||||
|
|||||||
-1
@@ -7,7 +7,6 @@ package hilt.error.sampleapp
|
|||||||
*/
|
*/
|
||||||
actual typealias HiltViewModel = dagger.hilt.android.lifecycle.HiltViewModel
|
actual typealias HiltViewModel = dagger.hilt.android.lifecycle.HiltViewModel
|
||||||
|
|
||||||
@AllowDifferentMembersInActual
|
|
||||||
actual typealias ViewModel = androidx.lifecycle.ViewModel
|
actual typealias ViewModel = androidx.lifecycle.ViewModel
|
||||||
|
|
||||||
actual typealias Inject = javax.inject.Inject
|
actual typealias Inject = javax.inject.Inject
|
||||||
|
|||||||
Reference in New Issue
Block a user