Mon, 24 Oct 2011 13:00:30 +0100
7098660: Write better overload resolution/inference tests
Summary: Add overload/inference debug diagnostics - added test harness using annotations to check outcome of overload resolution/inference
Reviewed-by: jjg
jjg@181 | 1 | /* |
darcy@699 | 2 | * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. |
jjg@181 | 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
jjg@181 | 4 | * |
jjg@181 | 5 | * This code is free software; you can redistribute it and/or modify it |
jjg@181 | 6 | * under the terms of the GNU General Public License version 2 only, as |
jjg@181 | 7 | * published by the Free Software Foundation. |
jjg@181 | 8 | * |
jjg@181 | 9 | * This code is distributed in the hope that it will be useful, but WITHOUT |
jjg@181 | 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
jjg@181 | 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
jjg@181 | 12 | * version 2 for more details (a copy is included in the LICENSE file that |
jjg@181 | 13 | * accompanied this code). |
jjg@181 | 14 | * |
jjg@181 | 15 | * You should have received a copy of the GNU General Public License version |
jjg@181 | 16 | * 2 along with this work; if not, write to the Free Software Foundation, |
jjg@181 | 17 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
jjg@181 | 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@181 | 22 | */ |
jjg@181 | 23 | |
jjg@181 | 24 | /* |
jjg@181 | 25 | * @test |
jjg@181 | 26 | * @bug 6512707 |
jjg@181 | 27 | * @summary "incompatible types" after (unrelated) annotation processing |
jjg@181 | 28 | * @author Peter Runge |
darcy@699 | 29 | * @library ../../lib |
darcy@699 | 30 | * @build JavacTestingAbstractProcessor |
jjg@181 | 31 | * @compile T6512707.java |
jjg@181 | 32 | * @compile -processor T6512707 TestAnnotation.java |
jjg@181 | 33 | */ |
jjg@181 | 34 | |
jjg@181 | 35 | import java.util.Set; |
jjg@181 | 36 | import javax.annotation.processing.*; |
jjg@181 | 37 | import javax.lang.model.SourceVersion; |
jjg@181 | 38 | import javax.lang.model.element.*; |
jjg@181 | 39 | import javax.lang.model.util.*; |
jjg@181 | 40 | |
jjg@181 | 41 | /** |
jjg@181 | 42 | * Dummy processor to force bug 6512707 to show - it does not matter what |
jjg@181 | 43 | * the annotation processor does for this bug. |
jjg@181 | 44 | */ |
darcy@699 | 45 | public class T6512707 extends JavacTestingAbstractProcessor { |
jjg@181 | 46 | |
jjg@181 | 47 | public boolean process(Set<? extends TypeElement> annotations, |
jjg@181 | 48 | RoundEnvironment roundEnv) { |
darcy@699 | 49 | return false; |
jjg@181 | 50 | } |
jjg@181 | 51 | } |