mcimadamore@1114: /* mcimadamore@1114: * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. mcimadamore@1114: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. mcimadamore@1114: * mcimadamore@1114: * This code is free software; you can redistribute it and/or modify it mcimadamore@1114: * under the terms of the GNU General Public License version 2 only, as mcimadamore@1114: * published by the Free Software Foundation. mcimadamore@1114: * mcimadamore@1114: * This code is distributed in the hope that it will be useful, but WITHOUT mcimadamore@1114: * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or mcimadamore@1114: * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License mcimadamore@1114: * version 2 for more details (a copy is included in the LICENSE file that mcimadamore@1114: * accompanied this code). mcimadamore@1114: * mcimadamore@1114: * You should have received a copy of the GNU General Public License version mcimadamore@1114: * 2 along with this work; if not, write to the Free Software Foundation, mcimadamore@1114: * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. mcimadamore@1114: * mcimadamore@1114: * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA mcimadamore@1114: * or visit www.oracle.com if you need additional information or have any mcimadamore@1114: * questions. mcimadamore@1114: */ mcimadamore@1114: mcimadamore@1114: @TraceResolve(keys={"compiler.err.ref.ambiguous"}) mcimadamore@1114: class PrimitiveOverReferenceVarargsAmbiguous { mcimadamore@1510: @Candidate(applicable=Phase.VARARGS, mostSpecific=true) mcimadamore@1114: static void m_byte(byte... b) {} mcimadamore@1510: @Candidate(applicable=Phase.VARARGS) mcimadamore@1114: static void m_byte(Byte... b) {} mcimadamore@1114: mcimadamore@1510: @Candidate(applicable=Phase.VARARGS, mostSpecific=true) mcimadamore@1114: static void m_short(short... s) {} mcimadamore@1510: @Candidate(applicable=Phase.VARARGS) mcimadamore@1114: static void m_short(Short... s) {} mcimadamore@1114: mcimadamore@1510: @Candidate(applicable=Phase.VARARGS, mostSpecific=true) mcimadamore@1114: static void m_int(int... i) {} mcimadamore@1510: @Candidate(applicable=Phase.VARARGS) mcimadamore@1114: static void m_int(Integer... i) {} mcimadamore@1114: mcimadamore@1510: @Candidate(applicable=Phase.VARARGS, mostSpecific=true) mcimadamore@1114: static void m_long(long... l) {} mcimadamore@1510: @Candidate(applicable=Phase.VARARGS) mcimadamore@1114: static void m_long(Long... l) {} mcimadamore@1114: mcimadamore@1510: @Candidate(applicable=Phase.VARARGS, mostSpecific=true) mcimadamore@1114: static void m_float(float... f) {} mcimadamore@1510: @Candidate(applicable=Phase.VARARGS) mcimadamore@1114: static void m_float(Float... f) {} mcimadamore@1114: mcimadamore@1510: @Candidate(applicable=Phase.VARARGS, mostSpecific=true) mcimadamore@1114: static void m_double(double... d) {} mcimadamore@1510: @Candidate(applicable=Phase.VARARGS) mcimadamore@1114: static void m_double(Double... d) {} mcimadamore@1114: mcimadamore@1510: @Candidate(applicable=Phase.VARARGS, mostSpecific=true) mcimadamore@1114: static void m_char(char... c) {} mcimadamore@1510: @Candidate(applicable=Phase.VARARGS) mcimadamore@1114: static void m_char(Character... c) {} mcimadamore@1114: mcimadamore@1510: @Candidate(applicable=Phase.VARARGS, mostSpecific=true) mcimadamore@1114: static void m_bool(boolean... z) {} mcimadamore@1510: @Candidate(applicable=Phase.VARARGS) mcimadamore@1114: static void m_bool(Boolean... z) {} mcimadamore@1114: mcimadamore@1114: { mcimadamore@1114: m_byte((byte)0); mcimadamore@1114: m_short((short)0); mcimadamore@1114: m_int(0); mcimadamore@1114: m_long(0L); mcimadamore@1114: m_float(0.0f); mcimadamore@1114: m_double(0.0); mcimadamore@1114: m_char('?'); mcimadamore@1114: m_bool(false); mcimadamore@1114: } mcimadamore@1114: }