Open

Description
Repro case
// File: src/main/java/example/one/A.java
package com.example.one;
import com.example.two.B;
public class A {
public void method() {
B instance = new B();
instance.method();
}
}
// File: src/main/java/example/two/B.java
package com.example.two;
public class B {
public void method() {}
}
-
Find the definition of
instance.method
from A.java
This is expected to work correctly, and it does. -
Now replace the following in B.java
-- package com.example.two;
++ package com.cheese.two;
- Find the definition of
instance.method
from A.java
Expected result
No definition should be found, as packages do not match.
Actual result
Wrong definition is found.