test/tools/javac/processing/errors/TestErrorCount.java

Thu, 21 Feb 2013 15:26:46 +0000

author
mcimadamore
date
Thu, 21 Feb 2013 15:26:46 +0000
changeset 1599
9f0ec00514b6
parent 1466
b52a38d4536c
child 2525
2eb010b6cb22
permissions
-rw-r--r--

8007461: Regression: bad overload resolution when inner class and outer class have method with same name
Summary: Fix regression in varargs method resolution introduced by bad refactoring
Reviewed-by: jjg

jjg@933 1 /*
jjg@933 2 * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
jjg@933 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
jjg@933 4 *
jjg@933 5 * This code is free software; you can redistribute it and/or modify it
jjg@933 6 * under the terms of the GNU General Public License version 2 only, as
jjg@933 7 * published by the Free Software Foundation.
jjg@933 8 *
jjg@933 9 * This code is distributed in the hope that it will be useful, but WITHOUT
jjg@933 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
jjg@933 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
jjg@933 12 * version 2 for more details (a copy is included in the LICENSE file that
jjg@933 13 * accompanied this code).
jjg@933 14 *
jjg@933 15 * You should have received a copy of the GNU General Public License version
jjg@933 16 * 2 along with this work; if not, write to the Free Software Foundation,
jjg@933 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
jjg@933 18 *
jjg@933 19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
jjg@933 20 * or visit www.oracle.com if you need additional information or have any
jjg@933 21 * questions.
jjg@933 22 */
jjg@933 23
jjg@933 24 /*
jjg@933 25 * @test
jjg@933 26 * @bug 6988079
jjg@933 27 * @summary Errors reported via Messager.printMessage(ERROR,"error message") are not tallied correctly
darcy@1466 28 * @library /tools/javac/lib
jjg@933 29 * @build JavacTestingAbstractProcessor TestErrorCount
jjg@933 30 * @compile/fail/ref=TestErrorCount.out -XDrawDiagnostics -processor TestErrorCount TestErrorCount.java
jjg@933 31 */
jjg@933 32
jjg@933 33 import java.io.*;
jjg@933 34 import java.util.*;
jjg@933 35 import javax.annotation.processing.*;
jjg@933 36 import javax.lang.model.element.*;
jjg@933 37 import javax.tools.*;
jjg@933 38
jjg@933 39 public class TestErrorCount extends JavacTestingAbstractProcessor {
jjg@933 40 @Override
jjg@933 41 public boolean process(Set<? extends TypeElement> annotations, RoundEnvironment roundEnv) {
jjg@933 42 messager.printMessage(Diagnostic.Kind.ERROR, "intentional error");
jjg@933 43 return true;
jjg@933 44 }
jjg@933 45 }
jjg@933 46

mercurial