Wed, 12 Feb 2014 11:16:22 -0800
Added tag jdk8u11-b00 for changeset c9db8c800797
vromero@2219 | 1 | /* |
vromero@2219 | 2 | * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. |
vromero@2219 | 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
vromero@2219 | 4 | * |
vromero@2219 | 5 | * This code is free software; you can redistribute it and/or modify it |
vromero@2219 | 6 | * under the terms of the GNU General Public License version 2 only, as |
vromero@2219 | 7 | * published by the Free Software Foundation. |
vromero@2219 | 8 | * |
vromero@2219 | 9 | * This code is distributed in the hope that it will be useful, but WITHOUT |
vromero@2219 | 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
vromero@2219 | 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
vromero@2219 | 12 | * version 2 for more details (a copy is included in the LICENSE file that |
vromero@2219 | 13 | * accompanied this code). |
vromero@2219 | 14 | * |
vromero@2219 | 15 | * You should have received a copy of the GNU General Public License version |
vromero@2219 | 16 | * 2 along with this work; if not, write to the Free Software Foundation, |
vromero@2219 | 17 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
vromero@2219 | 18 | * |
vromero@2219 | 19 | * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
vromero@2219 | 20 | * or visit www.oracle.com if you need additional information or have any |
vromero@2219 | 21 | * questions. |
vromero@2219 | 22 | */ |
vromero@2219 | 23 | |
vromero@2219 | 24 | /* |
vromero@2219 | 25 | * @test |
vromero@2219 | 26 | * @bug 8029569 |
vromero@2219 | 27 | * @summary internal javac cast exception when resolving varargs ambiguity |
vromero@2219 | 28 | * @compile/fail/ref=VarargsAmbiguityCrashTest.out -XDrawDiagnostics VarargsAmbiguityCrashTest.java |
vromero@2219 | 29 | */ |
vromero@2219 | 30 | |
vromero@2219 | 31 | public class VarargsAmbiguityCrashTest { |
vromero@2219 | 32 | void m1() { |
vromero@2219 | 33 | m2(null, new Exception()); |
vromero@2219 | 34 | } |
vromero@2219 | 35 | |
vromero@2219 | 36 | void m2(Long l) {} |
vromero@2219 | 37 | |
vromero@2219 | 38 | void m2(Exception... exception) {} |
vromero@2219 | 39 | |
vromero@2219 | 40 | void m2(Long l, Exception... exception) {} |
vromero@2219 | 41 | } |