summaryrefslogtreecommitdiff
path: root/test/files/neg/varargs.check
diff options
context:
space:
mode:
authorAleksandar Pokopec <aleksandar.prokopec@epfl.ch>2010-11-24 20:18:08 +0000
committerAleksandar Pokopec <aleksandar.prokopec@epfl.ch>2010-11-24 20:18:08 +0000
commit597acf7b0c26ca94a34f188fc2919b8482c3ab0a (patch)
tree19925504774f19edec80a3d700d0bb16f7c10507 /test/files/neg/varargs.check
parent46d1d8e55aa40037a536767f0ae8d98665c73617 (diff)
downloadscala-597acf7b0c26ca94a34f188fc2919b8482c3ab0a.tar.gz
scala-597acf7b0c26ca94a34f188fc2919b8482c3ab0a.tar.bz2
scala-597acf7b0c26ca94a34f188fc2919b8482c3ab0a.zip
Fix for #3621.
Added varargs annotation. Review by Rytz.
Diffstat (limited to 'test/files/neg/varargs.check')
-rw-r--r--test/files/neg/varargs.check7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/files/neg/varargs.check b/test/files/neg/varargs.check
new file mode 100644
index 0000000000..f3254708b8
--- /dev/null
+++ b/test/files/neg/varargs.check
@@ -0,0 +1,7 @@
+varargs.scala:11: error: A method without repeated parameters cannot be annotated with the `varargs` annotation.
+ @varargs def nov(a: Int) = 0
+ ^
+varargs.scala:13: error: A method with a varargs annotation produces a forwarder method with the same signature (a: Int,b: Array[java.lang.String])Int as an existing method.
+ @varargs def v2(a: Int, b: String*) = 0
+ ^
+two errors found \ No newline at end of file