[FE] Skip delegation descriptors during default params matching
^KT-61163 Fixed Review: https://jetbrains.team/p/kt/reviews/11599/timeline They can be safely skiped because we check overridden descriptors anyway. IMO, it's a bug that delegated descriptors are copied with default params. But it's much harder problem, and my IMO can easily be wrong for some weird reason.
This commit is contained in:
Vendored
+22
@@ -0,0 +1,22 @@
|
||||
// FIR_IDENTICAL
|
||||
// MODULE: m1-common
|
||||
// FILE: common.kt
|
||||
interface I {
|
||||
fun f(x: Int = 5) = x
|
||||
}
|
||||
|
||||
expect class E : I {
|
||||
override fun f(x: Int): Int
|
||||
}
|
||||
|
||||
expect class E2 : I {
|
||||
override fun f(x: Int): Int
|
||||
}
|
||||
|
||||
// MODULE: m2-jvm()()(m1-common)
|
||||
// FILE: jvm.kt
|
||||
actual class E(i: I) : I by i
|
||||
|
||||
actual class E2(i: I) : I by i {
|
||||
actual override fun f(x: Int): Int = x
|
||||
}
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
// MODULE: m1-common
|
||||
// FILE: common.kt
|
||||
<!INCOMPATIBLE_MATCHING{JVM}!>expect class E {
|
||||
<!INCOMPATIBLE_MATCHING{JVM}!>fun f(x: Int): Int<!>
|
||||
}<!>
|
||||
|
||||
expect class E2 {
|
||||
fun f(x: Int): Int
|
||||
}
|
||||
|
||||
// MODULE: m2-jvm()()(m1-common)
|
||||
// FILE: jvm.kt
|
||||
interface I {
|
||||
fun f(x: Int = 5) = x
|
||||
}
|
||||
|
||||
actual class <!NO_ACTUAL_CLASS_MEMBER_FOR_EXPECTED_CLASS!>E<!>(i: I) : I by i
|
||||
|
||||
actual class E2(i: I) : I by i {
|
||||
actual override fun f<!ACTUAL_FUNCTION_WITH_DEFAULT_ARGUMENTS!>(x: Int)<!> = x
|
||||
}
|
||||
Vendored
+21
@@ -0,0 +1,21 @@
|
||||
// MODULE: m1-common
|
||||
// FILE: common.kt
|
||||
expect class E {
|
||||
fun f(x: Int): Int
|
||||
}
|
||||
|
||||
expect class E2 {
|
||||
fun f(x: Int): Int
|
||||
}
|
||||
|
||||
// MODULE: m2-jvm()()(m1-common)
|
||||
// FILE: jvm.kt
|
||||
interface I {
|
||||
fun f(x: Int = 5) = x
|
||||
}
|
||||
|
||||
actual class <!NO_ACTUAL_CLASS_MEMBER_FOR_EXPECTED_CLASS!>E<!>(i: I) : I by i
|
||||
|
||||
actual class E2(i: I) : I by i {
|
||||
actual override fun f<!ACTUAL_FUNCTION_WITH_DEFAULT_ARGUMENTS!>(x: Int)<!> = x
|
||||
}
|
||||
Reference in New Issue
Block a user