FIR: do not provide symbols with different ClassId in JavaSymbolProvider
JavaSymbolProvider uses KotlinPsiElementFinderWrapper for finding classes. CliFinder looks for Java classing assuming that class with ClassId=a/b/C lives in directory a/b and do not look into real package name of Java class. This causes that we may find some classes which we should not see from current scope. Also, the IDE implementation works correctly here (it also checks file package) which cause different behaviour of FIR IDE and FIR This change also requires to fix testdata and make Java classes live in directory consistent with file package
This commit is contained in:
committed by
TeamCityServer
parent
82cadba80b
commit
39b2cd1027
Vendored
+2
-2
@@ -2,6 +2,6 @@ FILE: test.kt
|
||||
public final fun <K> select(x: R|K|, y: R|K|): R|K| {
|
||||
^select R|<local>/x|
|
||||
}
|
||||
public final fun test(d1: R|DiagnosticWithParameters1<*, *>|, d2: R|DiagnosticWithParameters2<*, *, *>|): R|kotlin/Unit| {
|
||||
lval res: R|ft<kotlin/Any, kotlin/Any?>| = R|jvm/select|<R|ft<kotlin/Any, kotlin/Any?>|>(R|<local>/d1|.R|/DiagnosticWithParameters1.a|, R|<local>/d2|.R|/DiagnosticWithParameters2.b|)
|
||||
public final fun test(d1: R|jvm/DiagnosticWithParameters1<*, *>|, d2: R|jvm/DiagnosticWithParameters2<*, *, *>|): R|kotlin/Unit| {
|
||||
lval res: R|ft<kotlin/Any, kotlin/Any?>| = R|jvm/select|<R|ft<kotlin/Any, kotlin/Any?>|>(R|<local>/d1|.R|jvm/DiagnosticWithParameters1.a|, R|<local>/d2|.R|jvm/DiagnosticWithParameters2.b|)
|
||||
}
|
||||
|
||||
+3
-3
@@ -1,10 +1,10 @@
|
||||
// FILE: Diagnostic.java
|
||||
// FILE: jvm/Diagnostic.java
|
||||
|
||||
package jvm;
|
||||
|
||||
public interface Diagnostic {}
|
||||
|
||||
// FILE: DiagnosticWithParameters1.java
|
||||
// FILE: jvm/DiagnosticWithParameters1.java
|
||||
|
||||
package jvm;
|
||||
|
||||
@@ -12,7 +12,7 @@ public interface DiagnosticWithParameters1<E, A> extends Diagnostic {
|
||||
A getA();
|
||||
}
|
||||
|
||||
// FILE: DiagnosticWithParameters2.java
|
||||
// FILE: jvm/DiagnosticWithParameters2.java
|
||||
|
||||
package jvm;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user