1/**
2 * @test /nodynamiccopyright/
3 * @bug 7177306
4 * @summary Regression: unchecked method call does not erase return type
5 * @compile/fail/ref=T7177306b.out -Werror -Xlint:unchecked -XDrawDiagnostics T7177306b.java
6 */
7
8import java.util.List;
9
10class T7177306b {
11
12    <T, S extends List<T>> List<T> m(List<? super T> arg1, S arg2, Class<Object> arg3) { return arg2; }
13
14    void test(List<Integer> li, List<String> ls, Class c) {
15        m(li, ls, c);
16        // should fail, because of bounds T <: Integer, S :> List<String>
17    }
18}
19