From 213116631aa2e338e09b6f6de93f8e9ef216ce14 Mon Sep 17 00:00:00 2001 From: Den Shabalin Date: Fri, 16 Aug 2013 12:17:22 +0200 Subject: SI-7757 disallow constructor annotations on traits Previously it was possible to define constructor annotations on traits with really weird side-effects (parser lost the body of the trait). Now constructor annotations on traits will cause appropriate syntax errors. --- test/files/neg/t7757.check | 4 ++++ test/files/neg/t7757.scala | 1 + 2 files changed, 5 insertions(+) create mode 100644 test/files/neg/t7757.check create mode 100644 test/files/neg/t7757.scala (limited to 'test/files/neg') diff --git a/test/files/neg/t7757.check b/test/files/neg/t7757.check new file mode 100644 index 0000000000..8790cbc428 --- /dev/null +++ b/test/files/neg/t7757.check @@ -0,0 +1,4 @@ +t7757.scala:1: error: ';' expected but '@' found. +trait Foo @annot + ^ +one error found diff --git a/test/files/neg/t7757.scala b/test/files/neg/t7757.scala new file mode 100644 index 0000000000..24f6c16cb4 --- /dev/null +++ b/test/files/neg/t7757.scala @@ -0,0 +1 @@ +trait Foo @annot \ No newline at end of file -- cgit v1.2.3