view test/tools/javac/generics/inference/7154127/T7154127.java @ 1283:6f0ed5a89c25

7154127: Inference cleanup: remove bound check analysis from visitors in Types.java Summary: Remove bound checking rules from recursive subtype visitors in Types.java and replace with centralized bound-checking logic Reviewed-by: jjg, dlsmith
author mcimadamore
date Wed, 11 Apr 2012 10:50:11 +0100
parents
children
line wrap: on
line source

/**
 * @test /nodynamiccopyright/
 * @bug 7154127
 * @summary Inference cleanup: remove bound check analysis from visitors in Types.java
 * @compile/fail/ref=T7154127.out -XDrawDiagnostics T7154127.java
 */
class T7154127 {

    static class B<V> {}

    static class D extends B<E> {}
    static class E extends B<D> {}

    static class Triple<U,V,W> { }

    static <T, Y extends B<U>, U extends B<Y>> Triple<T, Y, U> m() { return null; }

    void test() {
       Triple<B, ? extends D, ? extends E> t = m();
    }
}