diff options
Diffstat (limited to 'test/files/pos')
-rw-r--r-- | test/files/pos/t5953.scala | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/test/files/pos/t5953.scala b/test/files/pos/t5953.scala new file mode 100644 index 0000000000..90e7d84646 --- /dev/null +++ b/test/files/pos/t5953.scala @@ -0,0 +1,16 @@ +import scala.collection.{ mutable, immutable, generic, GenTraversableOnce } + +package object foo { + @inline implicit class TravOps[A, CC[A] <: GenTraversableOnce[A]](val coll: CC[A]) extends AnyVal { + def build[CC2[X]](implicit cbf: generic.CanBuildFrom[Nothing, A, CC2[A]]): CC2[A] = { + cbf() ++= coll.toIterator result + } + } +} + +package foo { + object Test { + def f1[T](xs: Traversable[T]) = xs.convertTo[immutable.Vector] + def f2[T](xs: Traversable[T]) = xs.build[immutable.Vector] + } +} |