FindUsagesTest: Add usages of extensions for functions declared in objects
This commit is contained in:
+23
@@ -0,0 +1,23 @@
|
||||
// PSI_ELEMENT: org.jetbrains.jet.lang.psi.JetNamedFunction
|
||||
// OPTIONS: overloadUsages
|
||||
trait X {
|
||||
|
||||
}
|
||||
|
||||
class A: X {
|
||||
|
||||
}
|
||||
|
||||
object O: A() {
|
||||
fun <caret>foo() {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
fun A.foo(s: String) {
|
||||
|
||||
}
|
||||
|
||||
fun X.foo(n: Int) {
|
||||
|
||||
}
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
class B {
|
||||
fun bar1(a: A) {
|
||||
a.foo("")
|
||||
}
|
||||
|
||||
fun bar2(x: X) {
|
||||
x.foo(0)
|
||||
}
|
||||
|
||||
fun bar3() {
|
||||
O.foo()
|
||||
}
|
||||
}
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
Function call (11: 11) O.foo()
|
||||
Function call (3: 11) a.foo("")
|
||||
Function call (7: 11) x.foo(0)
|
||||
@@ -233,6 +233,11 @@ public class JetFindUsagesTestGenerated extends AbstractJetFindUsagesTest {
|
||||
doTest("idea/testData/findUsages/kotlin/findFunctionUsages/kotlinOverloadAndExtensionUsages.0.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kotlinOverloadAndExtensionUsages2.0.kt")
|
||||
public void testKotlinOverloadAndExtensionUsages2() throws Exception {
|
||||
doTest("idea/testData/findUsages/kotlin/findFunctionUsages/kotlinOverloadAndExtensionUsages2.0.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kotlinPrivateMethodUsages.0.kt")
|
||||
public void testKotlinPrivateMethodUsages() throws Exception {
|
||||
doTest("idea/testData/findUsages/kotlin/findFunctionUsages/kotlinPrivateMethodUsages.0.kt");
|
||||
|
||||
Reference in New Issue
Block a user