aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/tools/javac/T8026963/TypeAnnotationsCrashWithErroneousTreeTest.java10
-rw-r--r--test/tools/javac/T8026963/TypeAnnotationsCrashWithErroneousTreeTest.out2
2 files changed, 12 insertions, 0 deletions
diff --git a/test/tools/javac/T8026963/TypeAnnotationsCrashWithErroneousTreeTest.java b/test/tools/javac/T8026963/TypeAnnotationsCrashWithErroneousTreeTest.java
new file mode 100644
index 00000000..366c5d81
--- /dev/null
+++ b/test/tools/javac/T8026963/TypeAnnotationsCrashWithErroneousTreeTest.java
@@ -0,0 +1,10 @@
+/*
+ * @test /nodynamiccopyright/
+ * @bug 8026963
+ * @summary type annotations code crashes for lambdas with void argument
+ * @compile/fail/ref=TypeAnnotationsCrashWithErroneousTreeTest.out -XDrawDiagnostics -XDshouldStopPolicy=FLOW TypeAnnotationsCrashWithErroneousTreeTest.java
+ */
+
+public class TypeAnnotationsCrashWithErroneousTreeTest {
+ private void t(this) {}
+}
diff --git a/test/tools/javac/T8026963/TypeAnnotationsCrashWithErroneousTreeTest.out b/test/tools/javac/T8026963/TypeAnnotationsCrashWithErroneousTreeTest.out
new file mode 100644
index 00000000..cb8fea40
--- /dev/null
+++ b/test/tools/javac/T8026963/TypeAnnotationsCrashWithErroneousTreeTest.out
@@ -0,0 +1,2 @@
+TypeAnnotationsCrashWithErroneousTreeTest.java:9:20: compiler.err.illegal.start.of.type
+1 error