aboutsummaryrefslogtreecommitdiff
path: root/tests
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
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')
-rw-r--r--tests/pos/valueclasses/optmatch.scala (renamed from tests/pending/pos/optmatch.scala)4
-rw-r--r--tests/pos/valueclasses/t5667.scala (renamed from tests/pending/pos/t5667.scala)2
-rw-r--r--tests/pos/valueclasses/t5953.scala (renamed from tests/pending/pos/t5953.scala)2
-rw-r--r--tests/pos/valueclasses/t6260a.scala (renamed from tests/pending/pos/t6260a.scala)2
-rw-r--r--tests/pos/valueclasses/t8011.scala (renamed from tests/pending/pos/t8011.scala)2
5 files changed, 11 insertions, 1 deletions
diff --git a/tests/pending/pos/optmatch.scala b/tests/pos/valueclasses/optmatch.scala
index 354be65da..a7995a455 100644
--- a/tests/pending/pos/optmatch.scala
+++ b/tests/pos/valueclasses/optmatch.scala
@@ -1,3 +1,5 @@
+package optmatch
+
// final case class NonZeroLong(value: Long) extends AnyVal {
// def get: Long = value
// def isEmpty: Boolean = get == 0l
@@ -5,7 +7,7 @@
class NonZeroLong(val value: Long) extends AnyVal {
def get: Long = value
- def isEmpty: Boolean = get == 0l
+ def isDefined: Boolean = get != 0l
}
object NonZeroLong {
def unapply(value: Long): NonZeroLong = new NonZeroLong(value)
diff --git a/tests/pending/pos/t5667.scala b/tests/pos/valueclasses/t5667.scala
index 353eec93d..80efb181b 100644
--- a/tests/pending/pos/t5667.scala
+++ b/tests/pos/valueclasses/t5667.scala
@@ -1,3 +1,5 @@
+package t5667
+
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/pos/valueclasses/t5953.scala
index 7ba035ec3..669fac7df 100644
--- a/tests/pending/pos/t5953.scala
+++ b/tests/pos/valueclasses/t5953.scala
@@ -1,3 +1,5 @@
+package t5953
+
import scala.collection.{ mutable, immutable, generic, GenTraversableOnce }
package object foo {
diff --git a/tests/pending/pos/t6260a.scala b/tests/pos/valueclasses/t6260a.scala
index 21b2fd43c..e29f10452 100644
--- a/tests/pending/pos/t6260a.scala
+++ b/tests/pos/valueclasses/t6260a.scala
@@ -1,3 +1,5 @@
+package t6260a
+
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
diff --git a/tests/pending/pos/t8011.scala b/tests/pos/valueclasses/t8011.scala
index 451590d77..88b4b53aa 100644
--- a/tests/pending/pos/t8011.scala
+++ b/tests/pos/valueclasses/t8011.scala
@@ -1,3 +1,5 @@
+package t8011
+
class ThingOps1(val x: String) extends AnyVal {
def fn[A]: Any = {
new X[A] { def foo(a: A) = a }