Fix tests for looking implementations from Java - no search for Kotlin declaration from usages
Probably because of this commit: https://github.com/JetBrains/intellij-community/commit/7d95ff4d86e584d66d558559a1a4678920281ca1
This commit is contained in:
+10
-2
@@ -1,6 +1,6 @@
|
|||||||
public class ImplementJavaInnerInterface {
|
public class ImplementJavaInnerInterface {
|
||||||
interface Test {
|
interface Test {
|
||||||
void foo();
|
void <caret>foo();
|
||||||
}
|
}
|
||||||
|
|
||||||
void test() {
|
void test() {
|
||||||
@@ -12,10 +12,18 @@ public class ImplementJavaInnerInterface {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static class OtherJava implements Test {
|
||||||
|
@Override
|
||||||
|
public void foo() {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void usage(Test test) {
|
void usage(Test test) {
|
||||||
test.<caret>foo();
|
test.foo();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// REF: (in ImplementJavaInnerInterface.OtherJava).foo()
|
||||||
// REF: (in KotlinTest).foo()
|
// REF: (in KotlinTest).foo()
|
||||||
// REF: <anonymous>.foo()
|
// REF: <anonymous>.foo()
|
||||||
+28
@@ -0,0 +1,28 @@
|
|||||||
|
public class ImplementJavaInnerInterfaceFromUsage {
|
||||||
|
interface Test {
|
||||||
|
void foo();
|
||||||
|
}
|
||||||
|
|
||||||
|
void test() {
|
||||||
|
Test test = new Test() {
|
||||||
|
@Override
|
||||||
|
public void foo() {
|
||||||
|
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
public static class OtherJava implements Test {
|
||||||
|
@Override
|
||||||
|
public void foo() {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void usage(Test test) {
|
||||||
|
test.<caret>foo();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// REF: (in ImplementJavaInnerInterfaceFromUsage.OtherJava).foo()
|
||||||
|
// REF: <anonymous>.foo()
|
||||||
+3
@@ -0,0 +1,3 @@
|
|||||||
|
class KotlinTest : ImplementJavaInnerInterfaceFromUsage.Test {
|
||||||
|
override fun foo() {}
|
||||||
|
}
|
||||||
+4
@@ -66,6 +66,10 @@ public class KotlinGotoImplementationMultifileTest extends KotlinLightCodeInsigh
|
|||||||
doJavaKotlinTest();
|
doJavaKotlinTest();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void testImplementJavaInnerInterfaceFromUsage() throws Exception {
|
||||||
|
doJavaKotlinTest();
|
||||||
|
}
|
||||||
|
|
||||||
private void doKotlinJavaTest() throws Exception {
|
private void doKotlinJavaTest() throws Exception {
|
||||||
doMultifileTest(getTestName(false) + ".kt", getTestName(false) + ".java");
|
doMultifileTest(getTestName(false) + ".kt", getTestName(false) + ".java");
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user