mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-09 20:42:52 +07:00
IDEA-130745 Incorrect auto cast after completion
* when merging dfa states, check that they're really equal after stripping complementary facts (there might be additional info in subclasses) * merge in separate groups in one go
This commit is contained in:
+16
@@ -0,0 +1,16 @@
|
||||
public abstract class Zzza {
|
||||
|
||||
abstract Object getFoo();
|
||||
|
||||
void foo(Zzza other) {
|
||||
int a;
|
||||
if (other.getFoo() instanceof String) {
|
||||
a = 1;
|
||||
} else {
|
||||
a = 2;
|
||||
}
|
||||
other.getFoo().subst<caret>
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
+1
@@ -34,6 +34,7 @@ class NormalCompletionDfaTest extends LightFixtureCompletionTestCase {
|
||||
void testCastTooComplexInstanceofedQualifier() { doAntiTest() }
|
||||
|
||||
void testDontCastInstanceofedQualifier() { doTest(); }
|
||||
void testDontCastPartiallyInstanceofedQualifier() { doAntiTest(); }
|
||||
void testQualifierCastingWithUnknownAssignments() { doTest(); }
|
||||
void testQualifierCastingBeforeLt() { doTest(); }
|
||||
void testCastQualifierForPrivateFieldReference() { doTest(); }
|
||||
|
||||
Reference in New Issue
Block a user