test/tools/javac/diags/examples/CantApplyDiamond1.java

Tue, 24 Dec 2013 09:17:37 -0800

author
ksrini
date
Tue, 24 Dec 2013 09:17:37 -0800
changeset 2227
998b10c43157
parent 1562
2154ed9ff6c8
child 2525
2eb010b6cb22
permissions
-rw-r--r--

8029230: Update copyright year to match last edit in jdk8 langtools repository for 2013
Reviewed-by: ksrini
Contributed-by: steve.sides@oracle.com

mcimadamore@1238 1 /*
mcimadamore@1562 2 * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
mcimadamore@1238 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
mcimadamore@1238 4 *
mcimadamore@1238 5 * This code is free software; you can redistribute it and/or modify it
mcimadamore@1238 6 * under the terms of the GNU General Public License version 2 only, as
mcimadamore@1238 7 * published by the Free Software Foundation.
mcimadamore@1238 8 *
mcimadamore@1238 9 * This code is distributed in the hope that it will be useful, but WITHOUT
mcimadamore@1238 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
mcimadamore@1238 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
mcimadamore@1238 12 * version 2 for more details (a copy is included in the LICENSE file that
mcimadamore@1238 13 * accompanied this code).
mcimadamore@1238 14 *
mcimadamore@1238 15 * You should have received a copy of the GNU General Public License version
mcimadamore@1238 16 * 2 along with this work; if not, write to the Free Software Foundation,
mcimadamore@1238 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
mcimadamore@1238 18 *
mcimadamore@1238 19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
mcimadamore@1238 20 * or visit www.oracle.com if you need additional information or have any
mcimadamore@1238 21 * questions.
mcimadamore@1238 22 */
mcimadamore@1238 23
mcimadamore@1296 24 // key: compiler.err.prob.found.req
mcimadamore@1238 25 // key: compiler.misc.cant.apply.diamond.1
mcimadamore@1562 26 // key: compiler.misc.incompatible.eq.upper.bounds
mcimadamore@1238 27 // key: compiler.misc.diamond
mcimadamore@1238 28
mcimadamore@1238 29 class CantApplyDiamond1<X> {
mcimadamore@1238 30
mcimadamore@1238 31 CantApplyDiamond1(CantApplyDiamond1<? super X> lz) { }
mcimadamore@1238 32
mcimadamore@1238 33 void test(CantApplyDiamond1<Integer> li) {
mcimadamore@1238 34 CantApplyDiamond1<String> ls = new CantApplyDiamond1<>(li);
mcimadamore@1238 35 }
mcimadamore@1238 36 }

mercurial