langtools/test/tools/javac/generics/6476118/T6476118a.java
author mcimadamore
Thu, 09 Dec 2010 15:50:34 +0000
changeset 7628 e7baeb97d164
child 45413 75202c6b2c35
permissions -rw-r--r--
6476118: compiler bug causes runtime ClassCastException for generics overloading Summary: compiler allows bridge methods to override unrelated method Reviewed-by: jjg

/**
 * @test  /nodynamiccopyright/
 * @bug 6476118
 * @summary compiler bug causes runtime ClassCastException for generics overloading
 * @compile/fail/ref=T6476118a.out -XDrawDiagnostics T6476118a.java
 */

class T6476118a {
    static class A {
        public int compareTo(Object o) { return 0; }
    }

    static class B extends A implements Comparable<B>{
        public int compareTo(B b){ return 0; }
    }
}