mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-04-20 13:31:28 +07:00
public not allowed for local inner classes
This commit is contained in:
@@ -820,7 +820,7 @@ public class HighlightUtil {
|
||||
}
|
||||
else {
|
||||
if (PsiModifier.PUBLIC.equals(modifier)) {
|
||||
isAllowed = modifierOwnerParent instanceof PsiJavaFile || modifierOwnerParent instanceof PsiClass;
|
||||
isAllowed = modifierOwnerParent instanceof PsiJavaFile || (modifierOwnerParent instanceof PsiClass && ((PsiClass)modifierOwnerParent).getQualifiedName() != null);
|
||||
}
|
||||
else if (PsiModifier.STATIC.equals(modifier) || PsiModifier.PRIVATE.equals(modifier) || PsiModifier.PROTECTED.equals(modifier) ||
|
||||
PsiModifier.PACKAGE_LOCAL.equals(modifier)) {
|
||||
|
||||
@@ -71,6 +71,7 @@ class LocalClassWithInner {
|
||||
void foo () {
|
||||
class A {
|
||||
<error descr="Modifier 'private' not allowed here">private</error> class B {}
|
||||
<error descr="Modifier 'public' not allowed here">public</error> class B1 {}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user