aboutsummaryrefslogtreecommitdiff
path: root/tests/pos
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2014-12-20 21:51:06 +0100
committerMartin Odersky <odersky@gmail.com>2014-12-20 21:51:06 +0100
commit7d513b4f3342c17e8b603a43c40770d0f97424de (patch)
tree977497ac89abe9a1a4122b148100016d9d6f98a1 /tests/pos
parenteb4bb1d092014be19b1669a7c16c6df3e11fda28 (diff)
downloaddotty-7d513b4f3342c17e8b603a43c40770d0f97424de.tar.gz
dotty-7d513b4f3342c17e8b603a43c40770d0f97424de.tar.bz2
dotty-7d513b4f3342c17e8b603a43c40770d0f97424de.zip
Don't emit copy method for case classes with repeated parameters.
scalac has the same restriction. The reason is that we do not have a means to specify a sequence-valued default for a vararg parameter. It would be nice if we could, but this requires a more substantial development effort.
Diffstat (limited to 'tests/pos')
-rw-r--r--tests/pos/annotDepMethType.scala7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/pos/annotDepMethType.scala b/tests/pos/annotDepMethType.scala
new file mode 100644
index 000000000..079ca6224
--- /dev/null
+++ b/tests/pos/annotDepMethType.scala
@@ -0,0 +1,7 @@
+case class pc(calls: Any*) extends annotation.TypeConstraint
+
+object Main {
+ class C0 { def baz: String = "" }
+ class C1 { def bar(c0: C0): String @pc(c0.baz) = c0.baz }
+ def trans(c1: C1): String @pc(c1.bar(throw new Error())) = c1.bar(new C0)
+}