Fir incorrect usage of AbstractExpectActualCompatibilityChecker.getCallablesCompatibility API
^KT-62027 Fixed `getCallablesCompatibility` requires parentSubstitutor as a parameter, but we created a member-level substitutor `getCallablesCompatibility` will create member-level substitutor itself, no need to create member-level substitutor on the call site. IndexOutOfBounds was happening in an attempt of creating member-level substitutor I will refactor the `createExpectActualTypeParameterSubstitutor` API in the following commits later. It will help to avoid problems like that
This commit is contained in:
+14
@@ -0,0 +1,14 @@
|
||||
// MODULE: m1-common
|
||||
// FILE: common.kt
|
||||
|
||||
expect open class Foo {
|
||||
fun <T> foo(t: T)
|
||||
}
|
||||
|
||||
// MODULE: m2-jvm()()(m1-common)
|
||||
// FILE: jvm.kt
|
||||
|
||||
actual open class Foo {
|
||||
actual fun <T> foo(t: T) {}
|
||||
fun foo(t: String) {}
|
||||
}
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
// MODULE: m1-common
|
||||
// FILE: common.kt
|
||||
|
||||
expect open class Foo {
|
||||
fun <T> foo(t: T)
|
||||
}
|
||||
|
||||
// MODULE: m2-jvm()()(m1-common)
|
||||
// FILE: jvm.kt
|
||||
|
||||
actual open <!ACTUAL_CLASSIFIER_MUST_HAVE_THE_SAME_MEMBERS_AS_NON_FINAL_EXPECT_CLASSIFIER!>class Foo<!> {
|
||||
actual fun <T> foo(t: T) {}
|
||||
fun <!NON_ACTUAL_MEMBER_DECLARED_IN_EXPECT_NON_FINAL_CLASSIFIER_ACTUALIZATION!>foo<!>(t: String) {}
|
||||
}
|
||||
Reference in New Issue
Block a user