test/tools/javac/6840059/T6840059.java

Tue, 11 Aug 2009 01:12:40 +0100

author
mcimadamore
date
Tue, 11 Aug 2009 01:12:40 +0100
changeset 358
62073a5becc5
child 384
ed31953ca025
permissions
-rw-r--r--

6840059: regression: javac silently crashes when resolving erroneous anonymous inner constructor
Summary: resolved an internal crash with constructor resolution
Reviewed-by: jjg

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

mercurial