aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorTobias Schlatter <tobias@meisch.ch>2014-03-20 20:23:02 +0100
committerTobias Schlatter <tobias@meisch.ch>2014-03-20 20:25:05 +0100
commite50646c21cbc842c1188fc876e16ea2b3e2a2ea3 (patch)
tree8355f0ef64102f569ebd970e49c2a591116d0b44 /tests
parenta4516eac1be98830c99ea48e9baedf022dfcb9f7 (diff)
downloaddotty-e50646c21cbc842c1188fc876e16ea2b3e2a2ea3.tar.gz
dotty-e50646c21cbc842c1188fc876e16ea2b3e2a2ea3.tar.bz2
dotty-e50646c21cbc842c1188fc876e16ea2b3e2a2ea3.zip
Minor improvements to tests (remove old comments)
Diffstat (limited to 'tests')
-rw-r--r--tests/pos/hygiene.scala12
-rw-r--r--tests/pos/t0061.scala4
-rw-r--r--tests/pos/t0066.scala2
-rw-r--r--tests/pos/t0069.scala7
-rw-r--r--tests/pos/t0076.scala1
-rw-r--r--tests/pos/t0082.scala1
-rw-r--r--tests/pos/t0091.scala2
7 files changed, 7 insertions, 22 deletions
diff --git a/tests/pos/hygiene.scala b/tests/pos/hygiene.scala
index 25f234959..9bbf73c0f 100644
--- a/tests/pos/hygiene.scala
+++ b/tests/pos/hygiene.scala
@@ -1,24 +1,16 @@
-// Illustrates a failure with hygiene.
+// Illustrates a use case where we need hygiene.
object hygiene {
class D[T]
case class C[T](x: D[T])
-// gives
+// without hygiene, this gave
// 7: error: wrong number of type arguments for hygiene.C.D, should be 0
// 7: error: constructor C in class C does not take type parameters
-//
-// The second error message is straightforward to fix using a refTypeTree for C in
-// desugar.classDef.classTypeRef, but the first one is much harder.
-
object C {
-
class C
-
-// class D
-
}
val c = C.apply(new D)
diff --git a/tests/pos/t0061.scala b/tests/pos/t0061.scala
index dd3f94f30..8a3aed7c6 100644
--- a/tests/pos/t0061.scala
+++ b/tests/pos/t0061.scala
@@ -2,8 +2,8 @@ object O {
class testClass ;
- case class testA() extends testClass ; // works if you leave away "extends..."
- // or if you write TestA
+ case class testA() extends testClass ;
+
def ga( x:testClass ) = x match {
case testA() => ()
}
diff --git a/tests/pos/t0066.scala b/tests/pos/t0066.scala
index 2153264e7..8ac328908 100644
--- a/tests/pos/t0066.scala
+++ b/tests/pos/t0066.scala
@@ -1,4 +1,4 @@
-class GBTree[A, B] /*with Map[A, B, GBTree[A,B]]*/ {
+class GBTree[A, B] {
abstract class Tree[A,B];
case class Node[A,B](key:A,value:B,smaller:Node[A,B],bigger:Node[A,B])
extends Tree[A,B];
diff --git a/tests/pos/t0069.scala b/tests/pos/t0069.scala
index e4c242c0e..23a25dbec 100644
--- a/tests/pos/t0069.scala
+++ b/tests/pos/t0069.scala
@@ -1,10 +1,5 @@
object testCQ {
- // why does this not work directly
- case class Thing( name:String, contains:List[ Thing ] );
- /* ... but this one does?
- abstract class T;
- case class Thing2( name:String, contains:List[ T ] ) extends T;
- */
+ case class Thing( name:String, contains:List[ Thing ] );
}
diff --git a/tests/pos/t0076.scala b/tests/pos/t0076.scala
index 5419cf515..bac26f2ab 100644
--- a/tests/pos/t0076.scala
+++ b/tests/pos/t0076.scala
@@ -1,4 +1,3 @@
-// This is extracted from a test file => don't add a new test file.
object bug {
def foo(i: => Int): Int = 0;
diff --git a/tests/pos/t0082.scala b/tests/pos/t0082.scala
index 2b365ca33..2a9e549b1 100644
--- a/tests/pos/t0082.scala
+++ b/tests/pos/t0082.scala
@@ -4,7 +4,6 @@ object Main {
def min0[A](less: (A, A) => Boolean, xs: List[A]): Option[A] = xs match {
case List() => None
case List(x) => Some(x)
-// case x :: Nil => Some(x)
case y :: ys => (min0(less, ys): @unchecked) match {
case Some(m) => if (less(y, m)) Some(y) else Some(m)
}
diff --git a/tests/pos/t0091.scala b/tests/pos/t0091.scala
index d491b7cfb..414e2c931 100644
--- a/tests/pos/t0091.scala
+++ b/tests/pos/t0091.scala
@@ -1,6 +1,6 @@
class Bug {
def main(args: Array[String]) = {
- var msg: String = null; // no bug if "null" instead of "_"
+ var msg: String = null;
val f: PartialFunction[Any, Unit] = { case 42 => msg = "coucou" };
}
}