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

Mon, 18 May 2015 09:27:09 +0200

author
jlahoda
date
Mon, 18 May 2015 09:27:09 +0200
changeset 2801
31ceef045272
parent 2000
4a6acc42c3a1
child 2525
2eb010b6cb22
permissions
-rw-r--r--

8080338: Incorrect GPL header causes RE script to miss swap to commercial header for licensee source bundle
8080339: Incorrect GPL header causes RE script to miss swap to commercial header for licensee source bundle
8080340: Incorrect GPL header causes RE script to miss swap to commercial header for licensee source bundle
Summary: Fixing incorrect file headers; also reviewed by kevin.l.brown@oracle.com
Reviewed-by: vromero

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

mercurial