langtools/test/tools/javac/generics/inference/8152411/T8152411.java
author mcimadamore
Wed, 23 Mar 2016 16:59:02 +0000
changeset 36716 4e98efed865f
permissions -rw-r--r--
8152411: Regression: inference fails to reject incompatible upper bounds Summary: Wrong undet variable comparison in propagation optimization Reviewed-by: vromero

/*
 * @test /nodynamiccopyright/
 * @bug 8152411
 * @summary Regression: nested unchecked call does not trigger erasure of return type
 *
 * @compile/fail/ref=T8152411.out -XDrawDiagnostics T8152411.java
 */
import java.util.List;

class T8152411 {
        <A2 extends A, A> A m(List<? super A2> a2) { return null; }
        <B> B g(B b) { return null; }

        void test() {
                List<Integer> I = null;
                String s = g(m(I));
        }
}