mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-05-06 05:10:22 +07:00
don't override first field by same named second (IDEA-174523)
This commit is contained in:
@@ -149,7 +149,7 @@ public class ClassInnerStuffCache {
|
||||
Map<String, PsiField> cachedFields = new THashMap<>();
|
||||
for (PsiField field : fields) {
|
||||
String name = field.getName();
|
||||
if (!(field instanceof ExternallyDefinedPsiElement) || !cachedFields.containsKey(name)) {
|
||||
if (!cachedFields.containsKey(name)) {
|
||||
cachedFields.put(name, field);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
class Test {
|
||||
int i;
|
||||
int <error descr="Variable 'i' is already defined in the scope">i</error>;
|
||||
}
|
||||
@@ -80,6 +80,9 @@ public class LightAdvHighlightingJdk6Test extends LightDaemonAnalyzerTestCase {
|
||||
public void testThisInArgListOfAnonymous() {
|
||||
doTest(false, false);
|
||||
}
|
||||
public void testSameFieldNameErrorOnSecond() {
|
||||
doTest(false, false);
|
||||
}
|
||||
|
||||
public void testEnumConstantWithoutInterfaceImplementation() throws Exception {
|
||||
doTest(false, false);
|
||||
|
||||
Reference in New Issue
Block a user