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

Wed, 14 Nov 2018 10:18:25 -0800

author
diazhou
date
Wed, 14 Nov 2018 10:18:25 -0800
changeset 3762
7909abb85562
parent 554
9d9f26857129
child 2525
2eb010b6cb22
permissions
-rw-r--r--

Added tag jdk8u201-b04 for changeset a7f48b9dfb82

mcimadamore@254 1 /*
ohair@554 2 * Copyright (c) 2009, Oracle and/or its affiliates. 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 *
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@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