non reifiable types: erase to avoid illegal generics array creation (IDEA-195562)

This commit is contained in:
Anna.Kozlova
2018-07-16 13:56:54 +02:00
parent 8c64535bb1
commit 23e9412db6
3 changed files with 24 additions and 1 deletions
@@ -0,0 +1,10 @@
// "Transform 'a' into final one element array" "true"
import java.util.*;
class Test {
public void test() {
final List<String>[] a = new List[]{new ArrayList<>()};
Runnable r = () -> {
a[0] = new ArrayList<>();
};
}
}
@@ -0,0 +1,10 @@
// "Transform 'a' into final one element array" "true"
import java.util.*;
class Test {
public void test() {
List<String> a = new ArrayList<>();
Runnable r = () -> {
<caret>a = new ArrayList<>();
};
}
}