aboutsummaryrefslogtreecommitdiff
path: root/tests/pos/valueclasses/t5953.scala
diff options
context:
space:
mode:
authorGuillaume Martres <smarter@ubuntu.com>2015-04-06 18:32:38 +0200
committerDmitry Petrashko <dmitry.petrashko@gmail.com>2015-05-01 13:27:42 +0200
commite5b02a88e66af0d5e9c37a881ac0237bf1d38387 (patch)
tree1e1277ca44b21d804025c17d7d7bd1f53d8c62aa /tests/pos/valueclasses/t5953.scala
parent06e1905aed315d5199936797c9e9493326b74595 (diff)
downloaddotty-e5b02a88e66af0d5e9c37a881ac0237bf1d38387.tar.gz
dotty-e5b02a88e66af0d5e9c37a881ac0237bf1d38387.tar.bz2
dotty-e5b02a88e66af0d5e9c37a881ac0237bf1d38387.zip
Enable pending pos tests related to value classes
Each test needs to have its own package because pos_all will try to compile the whole valueclasses directory at once. The remaining tests with "extends AnyVal" in tests/pending/pos are related to separate compilation, except for: - t6482.scala and t7022.scala which were fixed by https://github.com/scala/scala/pull/1468 in scalac and seem to trigger a similar bug in FullParameterization - strip-tvars-for-lubbasetypes.scala which was fixed by https://github.com/scala/scala/pull/1758 in scalac
Diffstat (limited to 'tests/pos/valueclasses/t5953.scala')
-rw-r--r--tests/pos/valueclasses/t5953.scala18
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/pos/valueclasses/t5953.scala b/tests/pos/valueclasses/t5953.scala
new file mode 100644
index 000000000..669fac7df
--- /dev/null
+++ b/tests/pos/valueclasses/t5953.scala
@@ -0,0 +1,18 @@
+package t5953
+
+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.to[immutable.Vector]
+ def f2[T](xs: Traversable[T]) = xs.build[immutable.Vector]
+ }
+}