resolve references by qualified class name when qualifiers can't be resolved

javac ignores problems caused by files located in wrong directories, IDEA reports them: try to search class by FQName when failed to resolve normally (IDEA-178376; IDEA-176179)
This commit is contained in:
Anna Kozlova
2017-09-06 19:42:00 +03:00
parent 3711f0567a
commit 955a6160cd
10 changed files with 75 additions and 16 deletions
@@ -0,0 +1,17 @@
package xxxy.yy;
class MyTest {
{
xxxy.yy.MyTest.I o;
I i = new xxxy.yy.MyTest.I() {
@Override
public void foo() {
}
};
}
interface I {
void foo();
}
}
@@ -0,0 +1,8 @@
// "Replace with lambda" "true"
package mismatch;
interface CanceledStatus {
CanceledStatus NULL = () -> false;
boolean isCanceled();
}
@@ -0,0 +1,13 @@
// "Replace with lambda" "true"
package mismatch;
interface CanceledStatus {
CanceledStatus NULL = new Canceled<caret>Status() {
@Override
public boolean isCanceled() {
return false;
}
};
boolean isCanceled();
}
@@ -3,8 +3,8 @@ package javax.annotation;
class A {
@Nonnull private final Object field;
A(@javax.annotation.Nonnull Object field, String... strs) {
this.field = field;<caret>
A(@Nonnull Object field, String... strs) {
this.field = field;
}
}