Java: Don't offer the quick-fix Collection.toArray() for type parameter arrays (like T[]) (IDEA-163341)

This commit is contained in:
Pavel Dolgov
2017-01-12 16:16:29 +03:00
parent 5e888e75a7
commit 83b5637a43
3 changed files with 21 additions and 0 deletions

View File

@@ -0,0 +1,10 @@
// "Apply conversion '.toArray(new T[0])'" "false"
import java.util.*;
class TypeVar<T> {
T[] foo() {
Set<T> set = new HashSet<>();
T[] arr = <caret>set;
return arr;
}
}

View File

@@ -0,0 +1,10 @@
// "Apply conversion '.toArray(new T[0][])'" "false"
import java.util.*;
class TypeVarArray<T> {
T[][] foo() {
Set<T[]> set = new HashSet<>();
T[][] arr = <caret>set;
return arr;
}
}