From 0f76d5094e61655c34f3fc3fa58707f3f399b4c5 Mon Sep 17 00:00:00 2001 From: vromero Date: Thu, 14 Nov 2013 19:28:20 +0000 Subject: 8026963: type annotations code crashes for code with erroneous trees Reviewed-by: jjg, jlahoda --- .../T8026963/TypeAnnotationsCrashWithErroneousTreeTest.java | 10 ++++++++++ .../T8026963/TypeAnnotationsCrashWithErroneousTreeTest.out | 2 ++ 2 files changed, 12 insertions(+) create mode 100644 test/tools/javac/T8026963/TypeAnnotationsCrashWithErroneousTreeTest.java create mode 100644 test/tools/javac/T8026963/TypeAnnotationsCrashWithErroneousTreeTest.out (limited to 'test') 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 -- cgit v1.2.3