Find usages and reference to delegation origin
This commit is contained in:
+11
@@ -0,0 +1,11 @@
|
||||
// PSI_ELEMENT: org.jetbrains.kotlin.psi.JetNamedFunction
|
||||
// OPTIONS: usages, skipImports
|
||||
package server
|
||||
|
||||
trait TraitWithImpl {
|
||||
fun <caret>foo() = 1
|
||||
}
|
||||
|
||||
public class TraitWithDelegatedWithImpl(f: TraitWithImpl): TraitWithImpl by f
|
||||
|
||||
fun test(twdwi: TraitWithDelegatedWithImpl) = twdwi.foo()
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
package client;
|
||||
|
||||
import server.TraitWithDelegatedWithImpl;
|
||||
|
||||
public class Test {
|
||||
public static void bar(TraitWithDelegatedWithImpl some) {
|
||||
some.foo();
|
||||
}
|
||||
}
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
Function call (11: 53) fun test(twdwi: TraitWithDelegatedWithImpl) = twdwi.foo()
|
||||
Unclassified usage (7: 14) some.foo();
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
// PSI_ELEMENT: org.jetbrains.kotlin.psi.JetNamedFunction
|
||||
// OPTIONS: usages, skipImports
|
||||
package server
|
||||
|
||||
trait TraitNoImpl {
|
||||
fun <caret>foo()
|
||||
}
|
||||
|
||||
public class TraitWithDelegatedNoImpl(f: TraitNoImpl): TraitNoImpl by f
|
||||
|
||||
fun test(twdni: TraitWithDelegatedNoImpl) = twdni.foo()
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
package client;
|
||||
|
||||
import server.TraitWithDelegatedNoImpl;
|
||||
|
||||
public class JClient {
|
||||
public static void bar(TraitWithDelegatedNoImpl some) {
|
||||
some.foo();
|
||||
}
|
||||
}
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
Function call (11: 51) fun test(twdni: TraitWithDelegatedNoImpl) = twdni.foo()
|
||||
Unclassified usage (7: 14) some.foo();
|
||||
@@ -0,0 +1,9 @@
|
||||
import k.*;
|
||||
|
||||
public class Test {
|
||||
public static void bar(TraitWithDelegatedNoImpl some) {
|
||||
some.<caret>foo();
|
||||
}
|
||||
}
|
||||
|
||||
// REF: (in k.TraitNoImpl).foo()
|
||||
@@ -0,0 +1,9 @@
|
||||
import k.*;
|
||||
|
||||
public class Test {
|
||||
public static void bar(TraitWithDelegatedWithImpl some) {
|
||||
some.<caret>foo();
|
||||
}
|
||||
}
|
||||
|
||||
// REF: (in k.TraitWithImpl).foo()
|
||||
@@ -39,4 +39,12 @@ object PlatformStaticFun {
|
||||
|
||||
trait TraitNoImpl {
|
||||
fun foo()
|
||||
}
|
||||
}
|
||||
|
||||
public class TraitWithDelegatedNoImpl(f: TraitNoImpl): TraitNoImpl by f
|
||||
|
||||
trait TraitWithImpl {
|
||||
fun foo() = 1
|
||||
}
|
||||
|
||||
public class TraitWithDelegatedWithImpl(f: TraitWithImpl): TraitWithImpl by f
|
||||
|
||||
Reference in New Issue
Block a user