965946d3ef
Do not try to find PSI element, but always use the IR element offsets instead. This greatly simplifies test data because we don't need to have custom PSI- and LT- based diagnostic ranges in every test, and K1/K2 behavior also is mostly the same. The exact offset ranges are not as important for backend diagnostics, so it's better to have K2+PSI and K2+LT behaving the same.
30 lines
509 B
Kotlin
Vendored
30 lines
509 B
Kotlin
Vendored
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
|
|
|
// FILE: A.java
|
|
|
|
public class A {
|
|
public static void foo() {}
|
|
public static void baz(String s) {}
|
|
}
|
|
|
|
// FILE: B.java
|
|
|
|
public class B extends A {
|
|
public static void bar(int i) {}
|
|
}
|
|
|
|
// FILE: K.kt
|
|
|
|
open class K : B() {
|
|
<!ACCIDENTAL_OVERRIDE!>fun foo() {}<!>
|
|
fun foo(a: Any) {}
|
|
<!ACCIDENTAL_OVERRIDE!>fun bar(i: Int) {}<!>
|
|
fun bar(i: String) {}
|
|
fun baz(i: Int) {}
|
|
|
|
companion object {
|
|
fun foo() {}
|
|
fun bar(i: Int) {}
|
|
}
|
|
}
|