test/langtools/tools/javac/T8175198/AnnotationsAndFormalParamsTest.java
changeset 47216 71c04702a3d5
parent 44194 c868c8c24e18
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/langtools/tools/javac/T8175198/AnnotationsAndFormalParamsTest.java	Tue Sep 12 19:03:39 2017 +0200
@@ -0,0 +1,11 @@
+/*
+ * @test /nodynamiccopyright/
+ * @bug 8175198
+ * @summary Javac incorrectly allows receiver parameters in annotation methods
+ * @compile/fail/ref=AnnotationsAndFormalParamsTest.out -XDrawDiagnostics -Werror -Xlint:unchecked AnnotationsAndFormalParamsTest.java
+ */
+
+@interface AnnotationsAndFormalParamsTest {
+    int value(int i);
+    int foo(AnnotationsAndFormalParamsTest this);
+}