[FE 1.0] 2/2 Drop AllowDifferentMembersInActual from compiler and testData
The annotation was dropped in the previous commit
This commit is contained in:
-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)
|
||||
// FILE: jvm.kt
|
||||
|
||||
@OptIn(ExperimentalMultiplatform::class)
|
||||
@AllowDifferentMembersInActual
|
||||
actual open class Base {
|
||||
actual fun existingMethodInBase() {}
|
||||
open fun injected(): Any = ""
|
||||
|
||||
+2
-4
@@ -14,11 +14,9 @@ expect open class Foo : Base {
|
||||
// MODULE: m2-jvm()()(m1-common)
|
||||
// FILE: jvm.kt
|
||||
|
||||
@OptIn(ExperimentalMultiplatform::class)
|
||||
@AllowDifferentMembersInActual
|
||||
actual open class Base {
|
||||
actual open <!ACTUAL_CLASSIFIER_MUST_HAVE_THE_SAME_MEMBERS_AS_NON_FINAL_EXPECT_CLASSIFIER_WARNING!>class Base<!> {
|
||||
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() {
|
||||
|
||||
-2
@@ -16,8 +16,6 @@ expect open class Foo : Transitive {
|
||||
// MODULE: m2-jvm()()(m1-common)
|
||||
// FILE: jvm.kt
|
||||
|
||||
@OptIn(ExperimentalMultiplatform::class)
|
||||
@AllowDifferentMembersInActual
|
||||
actual open class Base<T> {
|
||||
actual fun existingMethodInBase(param: T) {}
|
||||
open fun injected(param: T): Any = ""
|
||||
|
||||
+2
-4
@@ -16,11 +16,9 @@ expect open class Foo : Transitive {
|
||||
// MODULE: m2-jvm()()(m1-common)
|
||||
// FILE: jvm.kt
|
||||
|
||||
@OptIn(ExperimentalMultiplatform::class)
|
||||
@AllowDifferentMembersInActual
|
||||
actual open class Base<T> {
|
||||
actual open <!ACTUAL_CLASSIFIER_MUST_HAVE_THE_SAME_MEMBERS_AS_NON_FINAL_EXPECT_CLASSIFIER_WARNING!>class Base<!><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() {
|
||||
|
||||
+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
|
||||
// MODULE: m1-common
|
||||
// FILE: common.kt
|
||||
@@ -15,11 +14,9 @@ expect open class Foo : Base {
|
||||
// MODULE: m2-jvm()()(m1-common)
|
||||
// FILE: jvm.kt
|
||||
|
||||
@OptIn(ExperimentalMultiplatform::class)
|
||||
@AllowDifferentMembersInActual
|
||||
actual open class Base {
|
||||
actual open <!ACTUAL_CLASSIFIER_MUST_HAVE_THE_SAME_MEMBERS_AS_NON_FINAL_EXPECT_CLASSIFIER_WARNING!>class Base<!> {
|
||||
actual fun existingMethodInBase() {}
|
||||
fun injected() {}
|
||||
fun <!NON_ACTUAL_MEMBER_DECLARED_IN_EXPECT_NON_FINAL_CLASSIFIER_ACTUALIZATION_WARNING!>injected<!>() {}
|
||||
}
|
||||
|
||||
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
|
||||
// MODULE: m1-common
|
||||
// FILE: common.kt
|
||||
@@ -17,11 +16,9 @@ expect open class Foo : Transitive {
|
||||
// MODULE: m2-jvm()()(m1-common)
|
||||
// FILE: jvm.kt
|
||||
|
||||
@OptIn(ExperimentalMultiplatform::class)
|
||||
@AllowDifferentMembersInActual
|
||||
actual open class Base<T> {
|
||||
actual open <!ACTUAL_CLASSIFIER_MUST_HAVE_THE_SAME_MEMBERS_AS_NON_FINAL_EXPECT_CLASSIFIER_WARNING!>class Base<!><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() {
|
||||
|
||||
+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
|
||||
// MODULE: m1-common
|
||||
// FILE: common.kt
|
||||
@@ -15,9 +14,7 @@ expect open class Foo : Base {
|
||||
// MODULE: m2-jvm()()(m1-common)
|
||||
// FILE: jvm.kt
|
||||
|
||||
@OptIn(ExperimentalMultiplatform::class)
|
||||
@AllowDifferentMembersInActual
|
||||
actual typealias Base = BaseImpl
|
||||
actual typealias <!ACTUAL_CLASSIFIER_MUST_HAVE_THE_SAME_MEMBERS_AS_NON_FINAL_EXPECT_CLASSIFIER_WARNING!>Base<!> = BaseImpl
|
||||
|
||||
open class BaseImpl {
|
||||
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
|
||||
// MODULE: m1-common
|
||||
// FILE: common.kt
|
||||
@@ -17,9 +16,7 @@ expect open class Foo : Transitive {
|
||||
// MODULE: m2-jvm()()(m1-common)
|
||||
// FILE: jvm.kt
|
||||
|
||||
@OptIn(ExperimentalMultiplatform::class)
|
||||
@AllowDifferentMembersInActual
|
||||
actual typealias Base<T> = BaseImpl<T>
|
||||
actual typealias <!ACTUAL_CLASSIFIER_MUST_HAVE_THE_SAME_MEMBERS_AS_NON_FINAL_EXPECT_CLASSIFIER_WARNING!>Base<!><T> = BaseImpl<T>
|
||||
|
||||
open class BaseImpl<T> {
|
||||
fun existingMethodInBase(param: T) {}
|
||||
|
||||
Vendored
-2
@@ -12,6 +12,4 @@
|
||||
|
||||
import java.util.AbstractMap
|
||||
|
||||
@OptIn(kotlin.ExperimentalMultiplatform::class)
|
||||
@kotlin.AllowDifferentMembersInActual
|
||||
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
|
||||
|
||||
@OptIn(kotlin.ExperimentalMultiplatform::class)
|
||||
@kotlin.AllowDifferentMembersInActual
|
||||
public actual abstract class AbstractMutableMap<K, V>() : MutableMap<K, V>, AbstractMap<K, V>()
|
||||
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>()
|
||||
|
||||
Reference in New Issue
Block a user