test/tools/javac/6390045/T6390045b.java

Thu, 25 Aug 2011 17:18:25 -0700

author
schien
date
Thu, 25 Aug 2011 17:18:25 -0700
changeset 1067
f497fac86cf9
parent 554
9d9f26857129
child 2525
2eb010b6cb22
permissions
-rw-r--r--

Added tag jdk8-b02 for changeset b3c059de2a61

mcimadamore@357 1 /*
ohair@554 2 * Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved.
mcimadamore@357 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
mcimadamore@357 4 *
mcimadamore@357 5 * This code is free software; you can redistribute it and/or modify it
mcimadamore@357 6 * under the terms of the GNU General Public License version 2 only, as
mcimadamore@357 7 * published by the Free Software Foundation.
mcimadamore@357 8 *
mcimadamore@357 9 * This code is distributed in the hope that it will be useful, but WITHOUT
mcimadamore@357 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
mcimadamore@357 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
mcimadamore@357 12 * version 2 for more details (a copy is included in the LICENSE file that
mcimadamore@357 13 * accompanied this code).
mcimadamore@357 14 *
mcimadamore@357 15 * You should have received a copy of the GNU General Public License version
mcimadamore@357 16 * 2 along with this work; if not, write to the Free Software Foundation,
mcimadamore@357 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
mcimadamore@357 18 *
ohair@554 19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
ohair@554 20 * or visit www.oracle.com if you need additional information or have any
ohair@554 21 * questions.
mcimadamore@357 22 */
mcimadamore@357 23
mcimadamore@357 24 /*
mcimadamore@357 25 * @test
mcimadamore@357 26 * @bug 6390045
mcimadamore@357 27 * @summary Unexpected error "cannot access java.lang.Void" with '-target cldc1.0' with -source >=1.5
mcimadamore@357 28 *
mcimadamore@357 29 * @author mcimadamore
mcimadamore@357 30 * @compile -XDfailcomplete=java.lang.Void T6390045b.java
mcimadamore@357 31 */
mcimadamore@357 32
mcimadamore@357 33 class T6390045b {
mcimadamore@357 34 short s;
mcimadamore@357 35 Object o;
mcimadamore@357 36 Object p = choose(o, s);
mcimadamore@357 37 <T> T choose(T t1, T t2) { return t1; }
mcimadamore@357 38 }

mercurial