KT-38003 works for Java implementations of extension method
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
class JavaClass implements I {
|
||||
@Override
|
||||
public void foo(int receiver, Object p) {
|
||||
System.out.println(p);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
// FLOW: OUT
|
||||
|
||||
interface I {
|
||||
fun Int.foo(p: Any)
|
||||
}
|
||||
|
||||
class C1 : I {
|
||||
override fun Int.foo(p: Any) {
|
||||
println(p) // this usage will be shown twice due to bug in Java implementation: https://youtrack.jetbrains.com/issue/IDEA-236958
|
||||
}
|
||||
}
|
||||
|
||||
fun I.bar(s: String) {
|
||||
1.foo(<caret>s)
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
14 1.foo(<bold>s</bold>)
|
||||
4 fun Int.foo(<bold>p: Any</bold>)
|
||||
3 public void foo(int receiver, Object <bold>p</bold>) {
|
||||
4 System.out.println(<bold>p</bold>);
|
||||
9 println(<bold>p</bold>) // this usage will be shown twice due to bug in Java implementation: https://youtrack.jetbrains.com/issue/IDEA-236958
|
||||
8 override fun Int.foo(<bold>p: Any</bold>) {
|
||||
9 DUPLICATE: println(<bold>p</bold>) // this usage will be shown twice due to bug in Java implementation: https://youtrack.jetbrains.com/issue/IDEA-236958
|
||||
Reference in New Issue
Block a user