test/tools/javac/annotations/typeAnnotations/failures/StaticMethods.java
Print this page
*** 3,12 ****
* @bug 6843077 8006775
* @summary static methods don't have receivers
* @author Mahmood Ali
* @compile/fail/ref=StaticMethods.out -XDrawDiagnostics StaticMethods.java
*/
class StaticMethods {
! static void main(StaticMethods this) { }
}
@interface A { }
--- 3,15 ----
* @bug 6843077 8006775
* @summary static methods don't have receivers
* @author Mahmood Ali
* @compile/fail/ref=StaticMethods.out -XDrawDiagnostics StaticMethods.java
*/
+ import java.lang.annotation.*;
+
class StaticMethods {
! static void main(@A StaticMethods this) { }
}
+ @Target(ElementType.TYPE_USE)
@interface A { }