IDEA-120636 Wrong "enum cannot be instantiated"

This commit is contained in:
Anna Kozlova
2014-02-12 15:07:28 +01:00
parent aa96d2f5ff
commit 2076c69eeb
3 changed files with 18 additions and 1 deletions
@@ -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>;
}