diff options
author | Hubert Plociniczak <hubert.plociniczak@epfl.ch> | 2011-11-02 14:34:35 +0000 |
---|---|---|
committer | Hubert Plociniczak <hubert.plociniczak@epfl.ch> | 2011-11-02 14:34:35 +0000 |
commit | b6778be91900b8161e705dc2598ef7af86842b0b (patch) | |
tree | d15e8ec18a37eec212f50f1ace27714d7e7d4d34 /test/files/pos/builders.scala | |
parent | ac6c76f26d884a94d0c9ff54f055d3f9ab750bac (diff) | |
download | scala-b6778be91900b8161e705dc2598ef7af86842b0b.tar.gz scala-b6778be91900b8161e705dc2598ef7af86842b0b.tar.bz2 scala-b6778be91900b8161e705dc2598ef7af86842b0b.zip |
Begone t1737...
Diffstat (limited to 'test/files/pos/builders.scala')
-rw-r--r-- | test/files/pos/builders.scala | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/test/files/pos/builders.scala b/test/files/pos/builders.scala index 0b620769c0..51d8af88f8 100644 --- a/test/files/pos/builders.scala +++ b/test/files/pos/builders.scala @@ -18,16 +18,16 @@ object builders { def += (elem: B) { buf += elem } def result: List[B] = buf.toList } -/* +/* def fill[A, Dim1, Dim2, Coll](n1: Int, n2: Int, elem: A)(implicit b1: Builder[Coll, Dim1, A], b2: Builder[Coll, Dim2, Dim1]) = { for (i <- 0 until n1) { for (j <- 0 until n2) { b1 += elem - } + } b2 += b1.result } b2.result - } + } */ /* implicit def arrayBuilder[A, B] = new Builder[Array[A], Array[B], B] { @@ -35,7 +35,7 @@ object builders { private val buf = new scala.collection.mutable.ListBuffer[B] def += (elem: B) { buf += elem } def result: Array[B] = buf.toArray - } + } */ class Iter[A, C](elems: List[A]) { def ++ [B >: A, D](xs: Iterable[B])(implicit b: Builder[C, D, B]): D = { @@ -48,7 +48,7 @@ object builders { b.result } } - + def main(args : Array[String]) : Unit = { val x1 = new Iter[Int, List[Int]](List(1, 2, 3)) // val x2 = new Iter[Int, Array[Int]](List(1, 2, 3)) |