summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAdriaan Moors <adriaan.moors@typesafe.com>2013-08-19 11:06:11 -0700
committerAdriaan Moors <adriaan.moors@typesafe.com>2013-08-19 11:06:11 -0700
commitb6ba7ea9f0499335feba6838da80f4333e2d366f (patch)
tree3257a98b083193eb68404b2d502b00edd71e141e /test
parent5084b74048f7f21f38fdf45ebfa8e634b863bb01 (diff)
parenta721df7e030b2ba69e7a51d4821bc3622e4c6774 (diff)
downloadscala-b6ba7ea9f0499335feba6838da80f4333e2d366f.tar.gz
scala-b6ba7ea9f0499335feba6838da80f4333e2d366f.tar.bz2
scala-b6ba7ea9f0499335feba6838da80f4333e2d366f.zip
Merge pull request #2839 from densh/topic/si-7757
SI-7757 disallow constructor annotations on traits
Diffstat (limited to 'test')
-rw-r--r--test/files/neg/t7757a.check4
-rw-r--r--test/files/neg/t7757a.scala1
-rw-r--r--test/files/neg/t7757b.check4
-rw-r--r--test/files/neg/t7757b.scala2
4 files changed, 11 insertions, 0 deletions
diff --git a/test/files/neg/t7757a.check b/test/files/neg/t7757a.check
new file mode 100644
index 0000000000..de24e23004
--- /dev/null
+++ b/test/files/neg/t7757a.check
@@ -0,0 +1,4 @@
+t7757a.scala:1: error: ';' expected but '@' found.
+trait Foo @annot
+ ^
+one error found
diff --git a/test/files/neg/t7757a.scala b/test/files/neg/t7757a.scala
new file mode 100644
index 0000000000..24f6c16cb4
--- /dev/null
+++ b/test/files/neg/t7757a.scala
@@ -0,0 +1 @@
+trait Foo @annot \ No newline at end of file
diff --git a/test/files/neg/t7757b.check b/test/files/neg/t7757b.check
new file mode 100644
index 0000000000..3e5a0f1fa6
--- /dev/null
+++ b/test/files/neg/t7757b.check
@@ -0,0 +1,4 @@
+t7757b.scala:2: error: expected start of definition
+@annot2
+ ^
+one error found
diff --git a/test/files/neg/t7757b.scala b/test/files/neg/t7757b.scala
new file mode 100644
index 0000000000..e9a537dba1
--- /dev/null
+++ b/test/files/neg/t7757b.scala
@@ -0,0 +1,2 @@
+trait Foo2
+@annot2 \ No newline at end of file