Thu, 21 Feb 2013 14:43:51 -0800
8008405: Now that metafactory is in place, add javac lambda serialization tests
Summary: Tests part of original langtools serialization review.
Reviewed-by: mcimadamore
mcimadamore@1114 | 1 | /* |
mcimadamore@1114 | 2 | * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. |
mcimadamore@1114 | 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
mcimadamore@1114 | 4 | * |
mcimadamore@1114 | 5 | * This code is free software; you can redistribute it and/or modify it |
mcimadamore@1114 | 6 | * under the terms of the GNU General Public License version 2 only, as |
mcimadamore@1114 | 7 | * published by the Free Software Foundation. |
mcimadamore@1114 | 8 | * |
mcimadamore@1114 | 9 | * This code is distributed in the hope that it will be useful, but WITHOUT |
mcimadamore@1114 | 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
mcimadamore@1114 | 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
mcimadamore@1114 | 12 | * version 2 for more details (a copy is included in the LICENSE file that |
mcimadamore@1114 | 13 | * accompanied this code). |
mcimadamore@1114 | 14 | * |
mcimadamore@1114 | 15 | * You should have received a copy of the GNU General Public License version |
mcimadamore@1114 | 16 | * 2 along with this work; if not, write to the Free Software Foundation, |
mcimadamore@1114 | 17 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
mcimadamore@1114 | 18 | * |
mcimadamore@1114 | 19 | * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
mcimadamore@1114 | 20 | * or visit www.oracle.com if you need additional information or have any |
mcimadamore@1114 | 21 | * questions. |
mcimadamore@1114 | 22 | */ |
mcimadamore@1114 | 23 | |
mcimadamore@1114 | 24 | @TraceResolve(keys={"compiler.err.ref.ambiguous"}) |
mcimadamore@1114 | 25 | class PrimitiveOverReferenceVarargsAmbiguous { |
mcimadamore@1510 | 26 | @Candidate(applicable=Phase.VARARGS, mostSpecific=true) |
mcimadamore@1114 | 27 | static void m_byte(byte... b) {} |
mcimadamore@1510 | 28 | @Candidate(applicable=Phase.VARARGS) |
mcimadamore@1114 | 29 | static void m_byte(Byte... b) {} |
mcimadamore@1114 | 30 | |
mcimadamore@1510 | 31 | @Candidate(applicable=Phase.VARARGS, mostSpecific=true) |
mcimadamore@1114 | 32 | static void m_short(short... s) {} |
mcimadamore@1510 | 33 | @Candidate(applicable=Phase.VARARGS) |
mcimadamore@1114 | 34 | static void m_short(Short... s) {} |
mcimadamore@1114 | 35 | |
mcimadamore@1510 | 36 | @Candidate(applicable=Phase.VARARGS, mostSpecific=true) |
mcimadamore@1114 | 37 | static void m_int(int... i) {} |
mcimadamore@1510 | 38 | @Candidate(applicable=Phase.VARARGS) |
mcimadamore@1114 | 39 | static void m_int(Integer... i) {} |
mcimadamore@1114 | 40 | |
mcimadamore@1510 | 41 | @Candidate(applicable=Phase.VARARGS, mostSpecific=true) |
mcimadamore@1114 | 42 | static void m_long(long... l) {} |
mcimadamore@1510 | 43 | @Candidate(applicable=Phase.VARARGS) |
mcimadamore@1114 | 44 | static void m_long(Long... l) {} |
mcimadamore@1114 | 45 | |
mcimadamore@1510 | 46 | @Candidate(applicable=Phase.VARARGS, mostSpecific=true) |
mcimadamore@1114 | 47 | static void m_float(float... f) {} |
mcimadamore@1510 | 48 | @Candidate(applicable=Phase.VARARGS) |
mcimadamore@1114 | 49 | static void m_float(Float... f) {} |
mcimadamore@1114 | 50 | |
mcimadamore@1510 | 51 | @Candidate(applicable=Phase.VARARGS, mostSpecific=true) |
mcimadamore@1114 | 52 | static void m_double(double... d) {} |
mcimadamore@1510 | 53 | @Candidate(applicable=Phase.VARARGS) |
mcimadamore@1114 | 54 | static void m_double(Double... d) {} |
mcimadamore@1114 | 55 | |
mcimadamore@1510 | 56 | @Candidate(applicable=Phase.VARARGS, mostSpecific=true) |
mcimadamore@1114 | 57 | static void m_char(char... c) {} |
mcimadamore@1510 | 58 | @Candidate(applicable=Phase.VARARGS) |
mcimadamore@1114 | 59 | static void m_char(Character... c) {} |
mcimadamore@1114 | 60 | |
mcimadamore@1510 | 61 | @Candidate(applicable=Phase.VARARGS, mostSpecific=true) |
mcimadamore@1114 | 62 | static void m_bool(boolean... z) {} |
mcimadamore@1510 | 63 | @Candidate(applicable=Phase.VARARGS) |
mcimadamore@1114 | 64 | static void m_bool(Boolean... z) {} |
mcimadamore@1114 | 65 | |
mcimadamore@1114 | 66 | { |
mcimadamore@1114 | 67 | m_byte((byte)0); |
mcimadamore@1114 | 68 | m_short((short)0); |
mcimadamore@1114 | 69 | m_int(0); |
mcimadamore@1114 | 70 | m_long(0L); |
mcimadamore@1114 | 71 | m_float(0.0f); |
mcimadamore@1114 | 72 | m_double(0.0); |
mcimadamore@1114 | 73 | m_char('?'); |
mcimadamore@1114 | 74 | m_bool(false); |
mcimadamore@1114 | 75 | } |
mcimadamore@1114 | 76 | } |