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
+1
-1
@@ -1,5 +1,5 @@
|
||||
FILE: main.kt
|
||||
public final fun test(): R|kotlin/Unit| {
|
||||
lval some: R|Some| = R|/Some.Some|()
|
||||
lval some: R|foo/Some| = R|foo/Some.Some|()
|
||||
lval another: R|ERROR CLASS: Unresolved name: Another| = <Unresolved name: Another>#()
|
||||
}
|
||||
|
||||
+2
-1
@@ -1,4 +1,4 @@
|
||||
// FILE: Some.java
|
||||
// FILE: foo/Some.java
|
||||
|
||||
package foo;
|
||||
|
||||
@@ -7,6 +7,7 @@ class Some {}
|
||||
class Another {}
|
||||
|
||||
// FILE: main.kt
|
||||
package foo
|
||||
|
||||
fun test() {
|
||||
val some = Some()
|
||||
|
||||
Reference in New Issue
Block a user