create enum constant: support constant creation when static import is used, process varargs method candidates as vararg/basic separately (IDEA-121287)

This commit is contained in:
Anna Kozlova
2014-03-28 20:31:52 +01:00
parent 1cf32d2b3d
commit 123ba34507
8 changed files with 137 additions and 4 deletions
@@ -0,0 +1,21 @@
// "Create Enum Constant 'CRIME'" "true"
import java.util.Arrays;
import java.util.List;
import static AutomaticTypeInference.E.*;
class AutomaticTypeInference {
AutomaticTypeInference(List<E> gs) {
}
public static void main(String[] args) {
new AutomaticTypeInference(Arrays.asList(ACTION, CRIME));
}
enum E {
ACTION, CRIME;
}
}
@@ -0,0 +1,18 @@
// "Create Enum Constant 'CRIME'" "true"
import java.util.*;
class AutomaticTypeInference {
AutomaticTypeInference(List<E> gs) {
}
public static void main(String[] args) {
new AutomaticTypeInference(Arrays.asList(E.ACTION, E.CRIME));
}
enum E {
ACTION, CRIME;
}
}
@@ -0,0 +1,21 @@
// "Create Enum Constant 'CRIME'" "true"
import java.util.Arrays;
import java.util.List;
import static AutomaticTypeInference.E.*;
class AutomaticTypeInference {
AutomaticTypeInference(List<E> gs) {
}
public static void main(String[] args) {
new AutomaticTypeInference(Arrays.asList(ACTION, CRI<caret>ME));
}
enum E {
ACTION;
}
}
@@ -0,0 +1,18 @@
// "Create Enum Constant 'CRIME'" "true"
import java.util.*;
class AutomaticTypeInference {
AutomaticTypeInference(List<E> gs) {
}
public static void main(String[] args) {
new AutomaticTypeInference(Arrays.asList(E.ACTION, E.CRI<caret>ME));
}
enum E {
ACTION;
}
}