langtools/test/tools/javac/6360970/T6360970.java
author mcimadamore
Wed, 26 Oct 2016 15:41:25 +0100
changeset 41856 13a056e8f16e
parent 18378 00267721fe3a
permissions -rw-r--r--
8168774: Polymorhic signature method check crashes javac Summary: Check for polysig method assumes arity is greater than zero Reviewed-by: vromero

/*
 * @test /nodynamiccopyright/
 * @bug 6360970
 * @summary javac erroneously accept ambiguous field reference
 * @compile/fail/ref=T6360970.out -XDrawDiagnostics T6360970.java
 */
class T6360970 {
    interface A {
        int i = 1;
    }

    interface B {
        int i = 2;
    }

    interface C extends A, B { }

    static class D {
        public static final int i = 0;
    }

    static class E extends D implements C { }

    int i = E.i; //ambiguous
}