author | mcimadamore |
Tue, 25 Sep 2012 11:56:46 +0100 | |
changeset 14048 | 308d1cf8fe46 |
permissions | -rw-r--r-- |
14048
308d1cf8fe46
7177306: Regression: unchecked method call does not erase return type
mcimadamore
parents:
diff
changeset
|
1 |
/** |
308d1cf8fe46
7177306: Regression: unchecked method call does not erase return type
mcimadamore
parents:
diff
changeset
|
2 |
* @test /nodynamiccopyright/ |
308d1cf8fe46
7177306: Regression: unchecked method call does not erase return type
mcimadamore
parents:
diff
changeset
|
3 |
* @bug 7177306 |
308d1cf8fe46
7177306: Regression: unchecked method call does not erase return type
mcimadamore
parents:
diff
changeset
|
4 |
* @summary Regression: unchecked method call does not erase return type |
308d1cf8fe46
7177306: Regression: unchecked method call does not erase return type
mcimadamore
parents:
diff
changeset
|
5 |
* @compile/fail/ref=T7177306b.out -Werror -Xlint:unchecked -XDrawDiagnostics T7177306b.java |
308d1cf8fe46
7177306: Regression: unchecked method call does not erase return type
mcimadamore
parents:
diff
changeset
|
6 |
*/ |
308d1cf8fe46
7177306: Regression: unchecked method call does not erase return type
mcimadamore
parents:
diff
changeset
|
7 |
|
308d1cf8fe46
7177306: Regression: unchecked method call does not erase return type
mcimadamore
parents:
diff
changeset
|
8 |
import java.util.List; |
308d1cf8fe46
7177306: Regression: unchecked method call does not erase return type
mcimadamore
parents:
diff
changeset
|
9 |
|
308d1cf8fe46
7177306: Regression: unchecked method call does not erase return type
mcimadamore
parents:
diff
changeset
|
10 |
class T7177306b { |
308d1cf8fe46
7177306: Regression: unchecked method call does not erase return type
mcimadamore
parents:
diff
changeset
|
11 |
|
308d1cf8fe46
7177306: Regression: unchecked method call does not erase return type
mcimadamore
parents:
diff
changeset
|
12 |
<T, S extends List<T>> List<T> m(List<? super T> arg1, S arg2, Class<Object> arg3) { return arg2; } |
308d1cf8fe46
7177306: Regression: unchecked method call does not erase return type
mcimadamore
parents:
diff
changeset
|
13 |
|
308d1cf8fe46
7177306: Regression: unchecked method call does not erase return type
mcimadamore
parents:
diff
changeset
|
14 |
void test(List<Integer> li, List<String> ls, Class c) { |
308d1cf8fe46
7177306: Regression: unchecked method call does not erase return type
mcimadamore
parents:
diff
changeset
|
15 |
m(li, ls, c); |
308d1cf8fe46
7177306: Regression: unchecked method call does not erase return type
mcimadamore
parents:
diff
changeset
|
16 |
// should fail, because of bounds T <: Integer, S :> List<String> |
308d1cf8fe46
7177306: Regression: unchecked method call does not erase return type
mcimadamore
parents:
diff
changeset
|
17 |
} |
308d1cf8fe46
7177306: Regression: unchecked method call does not erase return type
mcimadamore
parents:
diff
changeset
|
18 |
} |