aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2015-12-08 18:13:12 +0100
committerMartin Odersky <odersky@gmail.com>2015-12-14 14:30:08 +0100
commit6c9168467d9278e13c06fc7e56ae7bf331ae0198 (patch)
tree6c9e9e84b527a5104e7e7bd53460f54e38136531 /tests
parent4900abc7edcd209608cf7539a968cb375bdcb9c1 (diff)
downloaddotty-6c9168467d9278e13c06fc7e56ae7bf331ae0198.tar.gz
dotty-6c9168467d9278e13c06fc7e56ae7bf331ae0198.tar.bz2
dotty-6c9168467d9278e13c06fc7e56ae7bf331ae0198.zip
Fix tricky bug coming up when compiling TraversableViewLike.
Diffstat (limited to 'tests')
-rw-r--r--tests/pos/paramcycle.scala18
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/pos/paramcycle.scala b/tests/pos/paramcycle.scala
new file mode 100644
index 000000000..d894fdf12
--- /dev/null
+++ b/tests/pos/paramcycle.scala
@@ -0,0 +1,18 @@
+import scala.collection._
+import scala.collection.generic._
+
+trait ViewMkString[+A]
+
+trait TraversableViewLike[+A,
+ +Coll,
+ +This <: TraversableView[A, Coll] with TraversableViewLike[A, Coll, This]]
+ extends Traversable[A] with TraversableLike[A, This] with ViewMkString[A] { self =>
+
+ def f[B](pf: PartialFunction[A, B]) =
+ filter(pf.isDefinedAt).map(pf)
+
+}
+
+trait TraversableView[+A, +Coll] extends TraversableViewLike[A, Coll, TraversableView[A, Coll]] { }
+
+