mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-08 23:39:39 +07:00
java: highlighting for statics in anonymous classes
This commit is contained in:
@@ -48,7 +48,7 @@ public class a {
|
||||
<error descr="Inner classes cannot have static declarations">static</error>
|
||||
final int f2 = x instanceof Integer ? 1 : 0;
|
||||
|
||||
<error descr="Modifier 'static' not allowed here">static</error>
|
||||
<error descr="Inner classes cannot have static declarations"><error descr="Modifier 'static' not allowed here">static</error></error>
|
||||
class a_ic_c2 {}
|
||||
|
||||
<error descr="Inner classes cannot have static declarations">static</error>
|
||||
@@ -75,7 +75,7 @@ public class a {
|
||||
<error descr="Inner classes cannot have static declarations">static</error>
|
||||
final int f2 = x instanceof Integer ? 1 : 0;
|
||||
|
||||
<error descr="Modifier 'static' not allowed here">static</error>
|
||||
<error descr="Inner classes cannot have static declarations"><error descr="Modifier 'static' not allowed here">static</error></error>
|
||||
class a_ic_c2 {}
|
||||
|
||||
<error descr="Inner classes cannot have static declarations">static</error>
|
||||
|
||||
@@ -91,7 +91,7 @@ enum OurEnum {
|
||||
|
||||
enum TestEnum
|
||||
{
|
||||
A(<error descr="Illegal forward reference">B</error>), B(A);
|
||||
A(<error descr="Illegal forward reference">B</error>), B(A);
|
||||
TestEnum(TestEnum other) {
|
||||
<error descr="Call to super is not allowed in enum constructor">super(null, 0)</error>;
|
||||
}
|
||||
@@ -115,8 +115,7 @@ class X extends <error descr="Classes cannot directly extend 'java.lang.Enum'">E
|
||||
|
||||
enum StaticInEnumConstantInitializer {
|
||||
AN {
|
||||
<error descr="Modifier 'static' not allowed here">static</error> class s {
|
||||
}
|
||||
<error descr="Inner classes cannot have static declarations"><error descr="Modifier 'static' not allowed here">static</error></error> class s { }
|
||||
private <error descr="Inner classes cannot have static declarations">static</error> final String t = String.valueOf(1);
|
||||
};
|
||||
}
|
||||
@@ -176,7 +175,6 @@ enum MyEnum {
|
||||
}
|
||||
//end of IDEADEV-8192
|
||||
|
||||
|
||||
class EnumBugIDEADEV15333 {
|
||||
public enum Type { one, to }
|
||||
Type type = Type.one;
|
||||
@@ -187,3 +185,21 @@ class EnumBugIDEADEV15333 {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class NestedEnums {
|
||||
enum E1 { }
|
||||
|
||||
class C2 {
|
||||
<error descr="Inner classes cannot have static declarations">enum E2</error> { }
|
||||
}
|
||||
|
||||
static class C3 {
|
||||
enum E3 { }
|
||||
}
|
||||
|
||||
{
|
||||
new C3() {
|
||||
<error descr="Inner classes cannot have static declarations">enum E2</error> { }
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user