Files
Tagir Valeev 97e4d3f847 Refactor DFA completion
1. Separate visitors for normal and smart completion, as problems are quite different
2. Remove custom memory state (exception assignment filtering) and custom DfaInstanceofValue. Instead, custom variable descriptor is used for complex expressions under instanceof or cast
3. Track TypeConstraint always; move to PsiType only when returning result

Should fix many subtle cases when cast-completion was not available
Fixes IDEA-242322 Dfa cast-completion is missing under boolean flag

GitOrigin-RevId: 1246e6ea84f8c359cc13fc805d32e0eef364ee1b
2020-06-02 11:48:01 +03:00

16 lines
234 B
Java

class Test {
interface A {
void foo();
}
interface B {}
void test(Object obj) {
boolean isA = obj instanceof A;
if (!isA && !(obj instanceof B)) {
return;
}
if (isA) {
obj.fo<caret>
}
}
}