mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IG: consider anonymous classes not matching (IDEA-185470)
This commit is contained in:
+4
@@ -804,6 +804,10 @@ public class EquivalenceChecker {
|
||||
final PsiExpression[] args1 = argumentList1 == null ? null : argumentList1.getExpressions();
|
||||
final PsiExpressionList argumentList2 = newExpression2.getArgumentList();
|
||||
final PsiExpression[] args2 = argumentList2 == null ? null : argumentList2.getExpressions();
|
||||
if (newExpression1.getAnonymousClass() != null || newExpression2.getAnonymousClass() != null) {
|
||||
// simply consider any anonymous classes not matching
|
||||
return EXACT_MISMATCH;
|
||||
}
|
||||
return expressionsAreEquivalent(args1, args2);
|
||||
}
|
||||
|
||||
|
||||
+16
@@ -198,4 +198,20 @@ class Declaration {
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
//////////////
|
||||
class DifferentAnonymous {
|
||||
|
||||
Object x() {
|
||||
return new Object() {
|
||||
int one;
|
||||
};
|
||||
}
|
||||
}
|
||||
class DifferentAnonymous2 extends DifferentAnonymous {
|
||||
|
||||
@Override
|
||||
Object x() {
|
||||
return new Object() {};
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user