mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-26 08:45:34 +07:00
IDEA-120636 Wrong "enum cannot be instantiated"
This commit is contained in:
+16
@@ -0,0 +1,16 @@
|
||||
import java.util.*;
|
||||
public class MyEnum {
|
||||
|
||||
enum Test {A,B}
|
||||
|
||||
public static Test[] accepted1() {
|
||||
List<Test> list = new ArrayList<Test>();
|
||||
return list.toArray(new Test[list.size()]);
|
||||
}
|
||||
|
||||
public static Test[] accepted2() {
|
||||
return new Test[]{};
|
||||
}
|
||||
|
||||
Test t = <error descr="Enum types cannot be instantiated">new Test()</error>;
|
||||
}
|
||||
Reference in New Issue
Block a user