langtools/test/tools/javac/Diagnostics/6722234/T6722234d.java
author vromero
Wed, 22 Apr 2015 09:44:15 -0700
changeset 30014 fc1f2b200c1f
parent 3766 7e2df99e9223
child 39812 6272642715a1
permissions -rw-r--r--
8078024: javac, several incorporation steps are silently failing when an error should be reported Reviewed-by: mcimadamore

/**
 * @test /nodynamiccopyright/
 * @bug     6722234 8078024
 * @summary javac diagnostics need better integration with the type-system
 * @author  mcimadamore
 * @compile/fail/ref=T6722234d_1.out -XDrawDiagnostics -XDdiags=where T6722234d.java
 * @compile/fail/ref=T6722234d_2.out -XDrawDiagnostics -XDdiags=where,simpleNames T6722234d.java
 */

class T6722234d {
    interface I1 {}
    interface I2 {}
    class A implements I1, I2 {}
    class B implements I1, I2 {}
    class Test {
        <Z> Z m(Z z1, Z z2) { return null; }
        void main(){
            A a = m(new A(), new B());
        }
    }
}