vromero@2219: /* vromero@2219: * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. vromero@2219: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. vromero@2219: * vromero@2219: * This code is free software; you can redistribute it and/or modify it vromero@2219: * under the terms of the GNU General Public License version 2 only, as vromero@2219: * published by the Free Software Foundation. vromero@2219: * vromero@2219: * This code is distributed in the hope that it will be useful, but WITHOUT vromero@2219: * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or vromero@2219: * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License vromero@2219: * version 2 for more details (a copy is included in the LICENSE file that vromero@2219: * accompanied this code). vromero@2219: * vromero@2219: * You should have received a copy of the GNU General Public License version vromero@2219: * 2 along with this work; if not, write to the Free Software Foundation, vromero@2219: * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. vromero@2219: * vromero@2219: * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA vromero@2219: * or visit www.oracle.com if you need additional information or have any vromero@2219: * questions. vromero@2219: */ vromero@2219: vromero@2219: /* vromero@2219: * @test vromero@2219: * @bug 8029569 vromero@2219: * @summary internal javac cast exception when resolving varargs ambiguity vromero@2219: * @compile/fail/ref=VarargsAmbiguityCrashTest.out -XDrawDiagnostics VarargsAmbiguityCrashTest.java vromero@2219: */ vromero@2219: vromero@2219: public class VarargsAmbiguityCrashTest { vromero@2219: void m1() { vromero@2219: m2(null, new Exception()); vromero@2219: } vromero@2219: vromero@2219: void m2(Long l) {} vromero@2219: vromero@2219: void m2(Exception... exception) {} vromero@2219: vromero@2219: void m2(Long l, Exception... exception) {} vromero@2219: }