redundant cast: open capture to compare old and new result types

This commit is contained in:
Anna Kozlova
2016-03-10 21:21:05 +01:00
parent 320904a20f
commit 23df4bf2a1
3 changed files with 22 additions and 3 deletions

View File

@@ -0,0 +1,11 @@
interface Pair<A extends String> {
A get();
}
class B {
void m(final Pair<?> p) {
String v = ((<warning descr="Casting 'p' to 'Pair<?>' is redundant">Pair<?></warning>) p).get();
}
}