Thu, 21 Feb 2013 15:26:46 +0000
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@162 | 1 | /* |
ohair@554 | 2 | * Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved. |
mcimadamore@162 | 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
mcimadamore@162 | 4 | * |
mcimadamore@162 | 5 | * This code is free software; you can redistribute it and/or modify it |
mcimadamore@162 | 6 | * under the terms of the GNU General Public License version 2 only, as |
mcimadamore@162 | 7 | * published by the Free Software Foundation. |
mcimadamore@162 | 8 | * |
mcimadamore@162 | 9 | * This code is distributed in the hope that it will be useful, but WITHOUT |
mcimadamore@162 | 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
mcimadamore@162 | 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
mcimadamore@162 | 12 | * version 2 for more details (a copy is included in the LICENSE file that |
mcimadamore@162 | 13 | * accompanied this code). |
mcimadamore@162 | 14 | * |
mcimadamore@162 | 15 | * You should have received a copy of the GNU General Public License version |
mcimadamore@162 | 16 | * 2 along with this work; if not, write to the Free Software Foundation, |
mcimadamore@162 | 17 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
mcimadamore@162 | 18 | * |
ohair@554 | 19 | * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
ohair@554 | 20 | * or visit www.oracle.com if you need additional information or have any |
ohair@554 | 21 | * questions. |
mcimadamore@162 | 22 | */ |
mcimadamore@162 | 23 | |
mcimadamore@162 | 24 | /* |
mcimadamore@162 | 25 | * @test |
mcimadamore@162 | 26 | * @bug 6762569 |
mcimadamore@162 | 27 | * @summary Javac crashes with AssertionError in Types.containedBy |
mcimadamore@162 | 28 | * @compile T6762569a.java |
mcimadamore@162 | 29 | */ |
mcimadamore@162 | 30 | import java.util.*; |
mcimadamore@162 | 31 | |
mcimadamore@162 | 32 | class T6762569a { |
mcimadamore@162 | 33 | <T> void m(T t, List<? super List<T>> list) {} |
mcimadamore@162 | 34 | |
mcimadamore@162 | 35 | void test(List<? super List<?>> list) { |
mcimadamore@162 | 36 | m("", list); |
mcimadamore@162 | 37 | } |
mcimadamore@162 | 38 | } |