test/tools/javac/6758789/T6758789b.java

Thu, 21 Feb 2013 15:26:46 +0000

author
mcimadamore
date
Thu, 21 Feb 2013 15:26:46 +0000
changeset 1599
9f0ec00514b6
parent 384
ed31953ca025
child 2525
2eb010b6cb22
permissions
-rw-r--r--

8007461: Regression: bad overload resolution when inner class and outer class have method with same name
Summary: Fix regression in varargs method resolution introduced by bad refactoring
Reviewed-by: jjg

mcimadamore@161 1 /*
jjg@384 2 * @test /nodynamiccopyright/
mcimadamore@161 3 * @bug 6758789
mcimadamore@161 4 * @summary 6758789: Some method resolution diagnostic should be improved
mcimadamore@161 5 * @author Maurizio Cimadamore
mcimadamore@161 6 *
mcimadamore@161 7 * @compile/fail/ref=T6758789b.out -Werror -XDrawDiagnostics -Xlint:unchecked T6758789b.java
mcimadamore@161 8 */
mcimadamore@161 9
mcimadamore@161 10 class T6758789a {
mcimadamore@161 11 class Foo<T> {}
mcimadamore@161 12
mcimadamore@161 13 <X> void m(Foo<X> foo) {}
mcimadamore@161 14
mcimadamore@161 15 void test() {
mcimadamore@161 16 m(new Foo());
mcimadamore@161 17 }
mcimadamore@161 18 }

mercurial