mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-26 15:27:45 +07:00
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:
+21
@@ -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;
|
||||
}
|
||||
}
|
||||
+18
@@ -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;
|
||||
}
|
||||
}
|
||||
+21
@@ -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;
|
||||
}
|
||||
}
|
||||
+18
@@ -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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user