aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorvromero <none@none>2013-11-14 19:28:20 +0000
committervromero <none@none>2013-11-14 19:28:20 +0000
commit0f76d5094e61655c34f3fc3fa58707f3f399b4c5 (patch)
tree45e15fbe9716433ecd8a60a9e4e03aee11ec8695 /test
parent7df1655863c586af35c4ba0099b7e669cc4df510 (diff)
8026963: type annotations code crashes for code with erroneous trees
Reviewed-by: jjg, jlahoda
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