redundant type arguments: recapture captured wildcards for original elements (IDEA-242856)

GitOrigin-RevId: 6f2da6bbdbc50708571177d6ff5f279a4fee8eb1
This commit is contained in:
Anna Kozlova
2020-06-08 13:45:45 +03:00
committed by intellij-monorepo-bot
parent e2f1377a65
commit 70232ecaa1
5 changed files with 144 additions and 87 deletions
@@ -0,0 +1,17 @@
// "Replace with <>" "true"
interface I<T> {
I<T> then(T t);
}
class J<T extends String> {}
class MyTest {
<K> I<K> when(K p) { return null;}
void m(J<?> l){
when(l).then((J) new J<>());
}
}
@@ -0,0 +1,17 @@
// "Replace with <>" "true"
interface I<T> {
I<T> then(T t);
}
class J<T extends String> {}
class MyTest {
<K> I<K> when(K p) { return null;}
void m(J<?> l){
when(l).then((J)new J<Str<caret>ing>());
}
}