PrimitiveVsReferenceSamePhase.java revision 2421:4525f3a38730
150472Speter/* 237Srgrimes * Copyright (c) 2014 Oracle and/or its affiliates. All rights reserved. 378822Snik * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 450203Srgrimes * 537Srgrimes * This code is free software; you can redistribute it and/or modify it 639161Sobrien * under the terms of the GNU General Public License version 2 only, as 739490Sobrien * published by the Free Software Foundation. 88571Srgrimes * 92878Srgrimes * This code is distributed in the hope that it will be useful, but WITHOUT 1072515Sru * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 1172515Sru * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 128571Srgrimes * version 2 for more details (a copy is included in the LICENSE file that 132878Srgrimes * accompanied this code). 148571Srgrimes * 158571Srgrimes * You should have received a copy of the GNU General Public License version 1672515Sru * 2 along with this work; if not, write to the Free Software Foundation, 172878Srgrimes * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 1872515Sru * 19155345Srwatson * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20155197Srwatson * or visit www.oracle.com if you need additional information or have any 21155197Srwatson * questions. 22155345Srwatson */ 2372515Sru 242878Srgrimes@TraceResolve(keys={"compiler.err.ref.ambiguous"}) 2572515Sruclass PrimitiveVsReferenceSamePhase { 262878Srgrimes @Candidate(applicable=Phase.BOX, mostSpecific=false) 2772515Sru static void m_byte(Byte b1, byte b2) {} 2872515Sru @Candidate(applicable=Phase.BOX, mostSpecific=false) 292878Srgrimes static void m_byte(Byte b1, Byte b2) {} 302878Srgrimes 3172515Sru @Candidate(applicable=Phase.BOX, mostSpecific=false) 3272515Sru static void m_short(Short s1, short s2) {} 3372515Sru @Candidate(applicable=Phase.BOX, mostSpecific=false) 3445173Sasami static void m_short(Short s1, Short s2) {} 35200054Scperciva 36161748Scperciva @Candidate(applicable=Phase.BOX, mostSpecific=false) 3786601Sru static void m_int(Integer i1, int i2) {} 3885220Sdarrenr @Candidate(applicable=Phase.BOX, mostSpecific=false) 3972515Sru static void m_int(Integer i1, Integer i2) {} 4072515Sru 41124753Seivind @Candidate(applicable=Phase.BOX, mostSpecific=false) 42124753Seivind static void m_long(Long l1, long l2) {} 43148871Scperciva @Candidate(applicable=Phase.BOX, mostSpecific=false) 44148871Scperciva static void m_long(Long l1, Long l2) {} 452878Srgrimes 46123051Sru @Candidate(applicable=Phase.BOX, mostSpecific=false) 4798699Sdes static void m_float(Float f1, float f2) {} 48123051Sru @Candidate(applicable=Phase.BOX, mostSpecific=false) 49106403Smarkm static void m_float(Float f1, Float f2) {} 5085484Sru 5180516Smarkm @Candidate(applicable=Phase.BOX, mostSpecific=false) 5239490Sobrien static void m_double(Double d1, double d2) {} 532878Srgrimes @Candidate(applicable=Phase.BOX, mostSpecific=false) 5486601Sru static void m_double(Double d1, Double d2) {} 552878Srgrimes 5612388Sache @Candidate(applicable=Phase.BOX, mostSpecific=false) 572878Srgrimes static void m_char(Character c1, char c2) {} 58136552Sru @Candidate(applicable=Phase.BOX, mostSpecific=false) 59135875Sdougb static void m_char(Character c1, Character c2) {} 6039490Sobrien 612878Srgrimes @Candidate(applicable=Phase.BOX, mostSpecific=false) 6239490Sobrien static void m_bool(Boolean z1, boolean z2) {} 6382191Skuriyama @Candidate(applicable=Phase.BOX, mostSpecific=false) 6482191Skuriyama static void m_bool(Boolean z1, Boolean z2) {} 6585848Scjc 6685916Scjc { 672878Srgrimes m_byte((byte)0, (byte)0); 6886601Sru m_short((short)0, (short)0); 692878Srgrimes m_int(0, 0); 7072515Sru m_long(0L, 0L); 7186601Sru m_float(0.0f, 0.0f); 722878Srgrimes m_double(0.0, 0.0); 7372515Sru m_char('?', '?'); 7441855Speter m_bool(false, false); 752878Srgrimes } 7641855Speter} 772878Srgrimes