aboutsummaryrefslogtreecommitdiff
path: root/tests/untried/pos/spec-cyclic.scala
diff options
context:
space:
mode:
authorSamuel Gruetter <samuel.gruetter@epfl.ch>2014-03-12 22:44:33 +0100
committerSamuel Gruetter <samuel.gruetter@epfl.ch>2014-03-12 22:44:33 +0100
commit9ef5f6817688f814a3450126aa7383b0928e80a0 (patch)
tree5727a2f7f7fd665cefdb312af2785c692f04377c /tests/untried/pos/spec-cyclic.scala
parent194be919664447631ba55446eb4874979c908d27 (diff)
downloaddotty-9ef5f6817688f814a3450126aa7383b0928e80a0.tar.gz
dotty-9ef5f6817688f814a3450126aa7383b0928e80a0.tar.bz2
dotty-9ef5f6817688f814a3450126aa7383b0928e80a0.zip
add tests from scala/test/files/{pos,neg}
with explicit Unit return type
Diffstat (limited to 'tests/untried/pos/spec-cyclic.scala')
-rw-r--r--tests/untried/pos/spec-cyclic.scala33
1 files changed, 33 insertions, 0 deletions
diff --git a/tests/untried/pos/spec-cyclic.scala b/tests/untried/pos/spec-cyclic.scala
new file mode 100644
index 000000000..6cd768537
--- /dev/null
+++ b/tests/untried/pos/spec-cyclic.scala
@@ -0,0 +1,33 @@
+trait AbsFun[@specialized -A, @specialized +B] {
+ def apply(x: A): B
+}
+
+trait MyPartialFunction[-A, +B] extends AnyRef with AbsFun[A, B]
+
+trait ColMap[A, +B] extends MyPartialFunction[A, B] /*with Collection[(A, B)] */
+
+trait ColSorted[K,+A] extends ColRanged[K,A]
+
+trait ColSortedMap[K,+E] extends ColMap[K,E] with ColSorted[K,Tuple2[K,E]]
+
+trait MutMap[A, B] extends AnyRef
+ with ColMap[A, B]
+
+trait ColRanged[K, +A] //extends Iterable[A]
+
+trait JclRanged[K,A] extends ColRanged[K,A] //with MutableIterable[A] {
+
+trait JclMap[K,E] extends /*collection.jcl.MutableIterable[Tuple2[K,E]] with*/ MutMap[K,E]
+
+trait JclSorted[K,A] extends ColSorted[K,A] with JclRanged[K,A]
+
+trait JclSortedMap[K,E] extends ColSortedMap[K,E] with JclMap[K,E] with JclSorted[K,Tuple2[K,E]]
+
+class Foo[A, B] extends JclSortedMap[A, B] {
+ def apply(x: A): B = sys.error("NYI")
+}
+
+class Bar {
+ val x: Foo[Int, Int] = new Foo[Int, Int]
+ x.apply(0)
+}