langtools/test/tools/javac/generics/inference/7177306/T7177306b.java
changeset 14048 308d1cf8fe46
equal deleted inserted replaced
14047:7c7a5611cf76 14048:308d1cf8fe46
       
     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 
       
     8 import java.util.List;
       
     9 
       
    10 class 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 }