mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-26 19:06:24 +07:00
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
This commit is contained in:
committed by
intellij-monorepo-bot
parent
002caf8f57
commit
97e4d3f847
@@ -0,0 +1,16 @@
|
||||
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>
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
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) {
|
||||
((A) obj).foo();<caret>
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user