test/tools/javac/resolve/tests/PrimitiveOverload.java

changeset 0
959103a6100f
equal deleted inserted replaced
-1:000000000000 0:959103a6100f
1 /*
2 * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation.
8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 */
23
24 @TraceResolve
25 class PrimitiveOverload {
26
27 @Candidate(applicable=Phase.BASIC, mostSpecific=true)
28 static void m_byte(byte b) {}
29 @Candidate(applicable=Phase.BASIC, mostSpecific=false)
30 static void m_byte(short b) {}
31 @Candidate(applicable=Phase.BASIC, mostSpecific=false)
32 static void m_byte(int b) {}
33 @Candidate(applicable=Phase.BASIC, mostSpecific=false)
34 static void m_byte(long b) {}
35 @Candidate(applicable=Phase.BASIC, mostSpecific=false)
36 static void m_byte(float b) {}
37 @Candidate(applicable=Phase.BASIC, mostSpecific=false)
38 static void m_byte(double b) {}
39
40 @Candidate
41 static void m_short(byte b) {}
42 @Candidate(applicable=Phase.BASIC, mostSpecific=true)
43 static void m_short(short b) {}
44 @Candidate(applicable=Phase.BASIC, mostSpecific=false)
45 static void m_short(int b) {}
46 @Candidate(applicable=Phase.BASIC, mostSpecific=false)
47 static void m_short(long b) {}
48 @Candidate(applicable=Phase.BASIC, mostSpecific=false)
49 static void m_short(float b) {}
50 @Candidate(applicable=Phase.BASIC, mostSpecific=false)
51 static void m_short(double b) {}
52
53 @Candidate
54 static void m_int(byte b) {}
55 @Candidate
56 static void m_int(short b) {}
57 @Candidate(applicable=Phase.BASIC, mostSpecific=true)
58 static void m_int(int b) {}
59 @Candidate(applicable=Phase.BASIC, mostSpecific=false)
60 static void m_int(long b) {}
61 @Candidate(applicable=Phase.BASIC, mostSpecific=false)
62 static void m_int(float b) {}
63 @Candidate(applicable=Phase.BASIC, mostSpecific=false)
64 static void m_int(double b) {}
65
66 @Candidate
67 static void m_long(byte b) {}
68 @Candidate
69 static void m_long(short b) {}
70 @Candidate
71 static void m_long(int b) {}
72 @Candidate(applicable=Phase.BASIC, mostSpecific=true)
73 static void m_long(long b) {}
74 @Candidate(applicable=Phase.BASIC, mostSpecific=false)
75 static void m_long(float b) {}
76 @Candidate(applicable=Phase.BASIC, mostSpecific=false)
77 static void m_long(double b) {}
78
79 @Candidate
80 static void m_float(byte b) {}
81 @Candidate
82 static void m_float(short b) {}
83 @Candidate
84 static void m_float(int b) {}
85 @Candidate
86 static void m_float(long b) {}
87 @Candidate(applicable=Phase.BASIC, mostSpecific=true)
88 static void m_float(float b) {}
89 @Candidate(applicable=Phase.BASIC, mostSpecific=false)
90 static void m_float(double b) {}
91
92 @Candidate
93 static void m_double(byte b) {}
94 @Candidate
95 static void m_double(short b) {}
96 @Candidate
97 static void m_double(int b) {}
98 @Candidate
99 static void m_double(long b) {}
100 @Candidate
101 static void m_double(float b) {}
102 @Candidate(applicable=Phase.BASIC, mostSpecific=true)
103 static void m_double(double b) {}
104
105 {
106 m_byte((byte)0);
107 m_short((short)0);
108 m_int(0);
109 m_long(0L);
110 m_float(0.0f);
111 m_double(0.0);
112 }
113 }

mercurial