test/tools/javac/T6881645.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

jjg@509 1 /*
ohair@554 2 * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
jjg@509 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
jjg@509 4 *
jjg@509 5 * This code is free software; you can redistribute it and/or modify it
jjg@509 6 * under the terms of the GNU General Public License version 2 only, as
jjg@509 7 * published by the Free Software Foundation.
jjg@509 8 *
jjg@509 9 * This code is distributed in the hope that it will be useful, but WITHOUT
jjg@509 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
jjg@509 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
jjg@509 12 * version 2 for more details (a copy is included in the LICENSE file that
jjg@509 13 * accompanied this code).
jjg@509 14 *
jjg@509 15 * You should have received a copy of the GNU General Public License version
jjg@509 16 * 2 along with this work; if not, write to the Free Software Foundation,
jjg@509 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
jjg@509 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.
jjg@509 22 */
jjg@509 23
jjg@509 24 /*
jjg@509 25 * @test
jjg@509 26 * @summary Unchecked method call on a method declared inside anonymous inner causes javac to crash
jjg@509 27 * @compile -Xlint:unchecked T6881645.java
jjg@509 28 */
jjg@509 29
jjg@509 30 class T6881645 {
jjg@509 31 Object o = new Object() {
jjg@509 32 <Z> void m (Class<Z> x) {}
jjg@509 33 void test() {
jjg@509 34 m((Class)null);
jjg@509 35 }
jjg@509 36 };
jjg@509 37 }
jjg@509 38

mercurial