test/tools/javac/OverrideChecks/6400189/T6400189c.java

Thu, 27 Aug 2009 11:08:27 -0700

author
jjg
date
Thu, 27 Aug 2009 11:08:27 -0700
changeset 384
ed31953ca025
parent 254
1ee128971f5d
child 554
9d9f26857129
permissions
-rw-r--r--

6875336: some tests should use /nodynamiccopyright/
Reviewed-by: darcy

mcimadamore@254 1 /*
mcimadamore@254 2 * Copyright 2009 Sun Microsystems, Inc. All Rights Reserved.
mcimadamore@254 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
mcimadamore@254 4 *
mcimadamore@254 5 * This code is free software; you can redistribute it and/or modify it
mcimadamore@254 6 * under the terms of the GNU General Public License version 2 only, as
mcimadamore@254 7 * published by the Free Software Foundation.
mcimadamore@254 8 *
mcimadamore@254 9 * This code is distributed in the hope that it will be useful, but WITHOUT
mcimadamore@254 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
mcimadamore@254 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
mcimadamore@254 12 * version 2 for more details (a copy is included in the LICENSE file that
mcimadamore@254 13 * accompanied this code).
mcimadamore@254 14 *
mcimadamore@254 15 * You should have received a copy of the GNU General Public License version
mcimadamore@254 16 * 2 along with this work; if not, write to the Free Software Foundation,
mcimadamore@254 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
mcimadamore@254 18 *
mcimadamore@254 19 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
mcimadamore@254 20 * CA 95054 USA or visit www.sun.com if you need additional information or
mcimadamore@254 21 * have any questions.
mcimadamore@254 22 */
mcimadamore@254 23
mcimadamore@254 24 /*
mcimadamore@254 25 * @test
mcimadamore@254 26 * @bug 6400189
mcimadamore@254 27 * @summary raw types and inference
mcimadamore@254 28 * @author mcimadamore
mcimadamore@254 29 * @compile T6400189c.java
mcimadamore@254 30 */
mcimadamore@254 31
mcimadamore@254 32 class T6400189c<T> {
mcimadamore@254 33
mcimadamore@254 34 static class A {
mcimadamore@254 35 <T> T m(T6400189c<T> x) {
mcimadamore@254 36 return null;
mcimadamore@254 37 }
mcimadamore@254 38 }
mcimadamore@254 39
mcimadamore@254 40 static class B<T> extends A {}
mcimadamore@254 41
mcimadamore@254 42 void test(B b) {
mcimadamore@254 43 Integer i = b.m(new T6400189c<Integer>());
mcimadamore@254 44 }
mcimadamore@254 45 }

mercurial