java: surround with array quick-fix fixes

GitOrigin-RevId: 8c3e7bcf9d4423515c59b027eca3ca35b0a18ff1
This commit is contained in:
Bas Leijdekkers
2022-08-10 17:14:01 +02:00
committed by intellij-monorepo-bot
parent f0bda341e0
commit ae1825cb0a
6 changed files with 70 additions and 26 deletions

View File

@@ -0,0 +1,13 @@
// "Surround with array initialization" "true-preview"
import java.util.List;
class X {
void x() {
List<String> l = of(new Integer[]{1});
}
static <E> List<E> of(E[] elements) {
return null;
}
}

View File

@@ -0,0 +1,13 @@
// "Surround with array initialization" "false"
import java.util.List;
class X {
void x() {
List<String> l = of(new<caret> Integer[]{1});
}
static <E> List<E> of(E[] elements) {
return null;
}
}

View File

@@ -0,0 +1,13 @@
// "Surround with array initialization" "true-preview"
import java.util.List;
class X {
void x() {
List<String> l = of(<caret>1);
}
static <E> List<E> of(E[] elements) {
return null;
}
}

View File

@@ -0,0 +1,13 @@
// "Surround with array initialization" "false"
import java.util.List;
class X {
void x() {
List<String> l = of(<caret>1);
}
static <E> List<E> of(E... elements) {
return null;
}
}