aboutsummaryrefslogtreecommitdiff
path: root/tests/pending/pos
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/pending/pos
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/pending/pos')
-rw-r--r--tests/pending/pos/optmatch.scala33
-rw-r--r--tests/pending/pos/t5667.scala4
-rw-r--r--tests/pending/pos/t5953.scala16
-rw-r--r--tests/pending/pos/t6260a.scala15
-rw-r--r--tests/pending/pos/t8011.scala8
5 files changed, 0 insertions, 76 deletions
diff --git a/tests/pending/pos/optmatch.scala b/tests/pending/pos/optmatch.scala
deleted file mode 100644
index 354be65da..000000000
--- a/tests/pending/pos/optmatch.scala
+++ /dev/null
@@ -1,33 +0,0 @@
-// final case class NonZeroLong(value: Long) extends AnyVal {
-// def get: Long = value
-// def isEmpty: Boolean = get == 0l
-// }
-
-class NonZeroLong(val value: Long) extends AnyVal {
- def get: Long = value
- def isEmpty: Boolean = get == 0l
-}
-object NonZeroLong {
- def unapply(value: Long): NonZeroLong = new NonZeroLong(value)
-}
-
-
-object Foo {
- def unapply(x: Int): NonZeroLong = new NonZeroLong(1L << x)
- // public long unapply(int);
- // 0: lconst_1
- // 1: iload_1
- // 2: lshl
- // 3: lreturn
-}
-
-object Test {
- def f(x: Int): Int = x match {
- case Foo(1024l) => 1
- case _ => 2
- }
- def main(args: Array[String]): Unit = {
- println(f(10))
- println(f(11))
- }
-}
diff --git a/tests/pending/pos/t5667.scala b/tests/pending/pos/t5667.scala
deleted file mode 100644
index 353eec93d..000000000
--- a/tests/pending/pos/t5667.scala
+++ /dev/null
@@ -1,4 +0,0 @@
-object Main {
- implicit class C(val s: String) extends AnyVal
- implicit class C2(val s: String) extends AnyRef
-}
diff --git a/tests/pending/pos/t5953.scala b/tests/pending/pos/t5953.scala
deleted file mode 100644
index 7ba035ec3..000000000
--- a/tests/pending/pos/t5953.scala
+++ /dev/null
@@ -1,16 +0,0 @@
-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]
- }
-}
diff --git a/tests/pending/pos/t6260a.scala b/tests/pending/pos/t6260a.scala
deleted file mode 100644
index 21b2fd43c..000000000
--- a/tests/pending/pos/t6260a.scala
+++ /dev/null
@@ -1,15 +0,0 @@
-final class Option[+A](val value: A) extends AnyVal
-
-// Was: sandbox/test.scala:21: error: bridge generated for member method f: ()Option[A] in class Bar
-// which overrides method f: ()Option[A] in class Foo"
-abstract class Foo[A] { def f(): Option[A] }
- class Bar[A] extends Foo[A] { def f(): Option[A] = ??? }
-
-// User reported this as erroneous but I couldn't reproduce with 2.10.{0,1,2,3}
-// https://issues.scala-lang.org/browse/SI-6260?focusedCommentId=64764&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-64764
-// I suspect he whittled down the example too far.
-class Wrapper(val value: Int) extends AnyVal
-abstract class Test { def check(the: Wrapper): Boolean }
-object T {
- new Test { def check(the: Wrapper) = true }
-}
diff --git a/tests/pending/pos/t8011.scala b/tests/pending/pos/t8011.scala
deleted file mode 100644
index 451590d77..000000000
--- a/tests/pending/pos/t8011.scala
+++ /dev/null
@@ -1,8 +0,0 @@
-class ThingOps1(val x: String) extends AnyVal {
- def fn[A]: Any = {
- new X[A] { def foo(a: A) = a }
- 0
- }
-}
-
-trait X[B] { def foo(a: B): Any }