summaryrefslogtreecommitdiff
path: root/test/files/pos/spec-cyclic.scala
diff options
context:
space:
mode:
authorIulian Dragos <jaguarul@gmail.com>2009-06-18 17:19:55 +0000
committerIulian Dragos <jaguarul@gmail.com>2009-06-18 17:19:55 +0000
commit3ee6b3653f8c25d7d6b19b9f5d4af7fa082146a8 (patch)
treee97b8c0dd8d61e82f825f528f98842f777621f7a /test/files/pos/spec-cyclic.scala
parentbe8e3c69114da5bc3020d5363b338b1c83aa22ef (diff)
downloadscala-3ee6b3653f8c25d7d6b19b9f5d4af7fa082146a8.tar.gz
scala-3ee6b3653f8c25d7d6b19b9f5d4af7fa082146a8.tar.bz2
scala-3ee6b3653f8c25d7d6b19b9f5d4af7fa082146a8.zip
Specialization landed in trunk.
Diffstat (limited to 'test/files/pos/spec-cyclic.scala')
-rw-r--r--test/files/pos/spec-cyclic.scala33
1 files changed, 33 insertions, 0 deletions
diff --git a/test/files/pos/spec-cyclic.scala b/test/files/pos/spec-cyclic.scala
new file mode 100644
index 0000000000..65da297989
--- /dev/null
+++ b/test/files/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 = error("NYI")
+}
+
+class Bar {
+ val x: Foo[Int, Int] = new Foo[Int, Int]
+ x.apply(0)
+}