test/tools/javac/generics/7022054/T7022054pos1.java

Sat, 17 Nov 2012 19:01:03 +0000

author
mcimadamore
date
Sat, 17 Nov 2012 19:01:03 +0000
changeset 1415
01c9d4161882
parent 1393
d7d932236fee
child 2525
2eb010b6cb22
permissions
-rw-r--r--

8003280: Add lambda tests
Summary: Turn on lambda expression, method reference and default method support
Reviewed-by: jjg

mcimadamore@907 1 /*
mcimadamore@907 2 * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
mcimadamore@907 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
mcimadamore@907 4 *
mcimadamore@907 5 * This code is free software; you can redistribute it and/or modify it
mcimadamore@907 6 * under the terms of the GNU General Public License version 2 only, as
mcimadamore@907 7 * published by the Free Software Foundation.
mcimadamore@907 8 *
mcimadamore@907 9 * This code is distributed in the hope that it will be useful, but WITHOUT
mcimadamore@907 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
mcimadamore@907 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
mcimadamore@907 12 * version 2 for more details (a copy is included in the LICENSE file that
mcimadamore@907 13 * accompanied this code).
mcimadamore@907 14 *
mcimadamore@907 15 * You should have received a copy of the GNU General Public License version
mcimadamore@907 16 * 2 along with this work; if not, write to the Free Software Foundation,
mcimadamore@907 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
mcimadamore@907 18 *
mcimadamore@907 19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
mcimadamore@907 20 * or visit www.oracle.com if you need additional information or have any
mcimadamore@907 21 * questions.
mcimadamore@907 22 */
mcimadamore@907 23
mcimadamore@907 24 /*
mcimadamore@907 25 * @test
mcimadamore@907 26 * @bug 7022054
mcimadamore@907 27 *
mcimadamore@907 28 * @summary Invalid compiler error on covariant overriding methods with the same erasure
mcimadamore@1393 29 * @compile -source 7 T7022054pos1.java
mcimadamore@1415 30 * @compile/fail/ref=T7022054pos1.out -XDrawDiagnostics T7022054pos1.java
mcimadamore@907 31 *
mcimadamore@907 32 */
mcimadamore@907 33
mcimadamore@907 34 class T7022054pos1 {
mcimadamore@907 35 static class A {
mcimadamore@907 36 A m(String s) { return null; }
mcimadamore@907 37 }
mcimadamore@907 38 static class B extends A {
mcimadamore@907 39 <X extends B> X m(String s) { return null; }
mcimadamore@907 40 }
mcimadamore@907 41 }

mercurial