summaryrefslogtreecommitdiff
path: root/test/files/pos
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2009-09-11 15:23:05 +0000
committerPaul Phillips <paulp@improving.org>2009-09-11 15:23:05 +0000
commit61ff261346289f7886350a8a4da5688574070e59 (patch)
tree4869fbb98aebf26b97b473ba27a0ea0deba72874 /test/files/pos
parent8871528f60958a45eb119a5cc487f87215e4e92f (diff)
downloadscala-61ff261346289f7886350a8a4da5688574070e59.tar.gz
scala-61ff261346289f7886350a8a4da5688574070e59.tar.bz2
scala-61ff261346289f7886350a8a4da5688574070e59.zip
Deprecated case classes inheriting from other c...
Deprecated case classes inheriting from other case classes, and updated all the tests which did so.
Diffstat (limited to 'test/files/pos')
-rw-r--r--test/files/pos/bug1087.scala2
-rw-r--r--test/files/pos/jesper.scala30
-rw-r--r--test/files/pos/t0710.scala2
-rw-r--r--test/files/pos/t1087.scala3
-rw-r--r--test/files/pos/typesafecons.scala2
5 files changed, 2 insertions, 37 deletions
diff --git a/test/files/pos/bug1087.scala b/test/files/pos/bug1087.scala
deleted file mode 100644
index 19d62116c6..0000000000
--- a/test/files/pos/bug1087.scala
+++ /dev/null
@@ -1,2 +0,0 @@
-case class Foo
-case class Prd (pred : Char => Boolean) extends Foo
diff --git a/test/files/pos/jesper.scala b/test/files/pos/jesper.scala
deleted file mode 100644
index b2a027b0f2..0000000000
--- a/test/files/pos/jesper.scala
+++ /dev/null
@@ -1,30 +0,0 @@
-object Pair {
- sealed trait Pair {
- type First
- type Second <: Pair
- }
-
- case class End extends Pair {
- type First = Nothing
- type Second = End
-
- def ::[T](v : T) : Cons[T, End] = Cons(v, this)
- }
-
- case object End extends End
-
- final case class Cons[T1, T2 <: Pair](_1 : T1, _2 : T2) extends Pair {
- type First = T1
- type Second = T2
-
- def ::[T](v : T) : Cons[T, Cons[T1, T2]] = Cons(v, this)
- def find[T](implicit finder : Cons[T1, T2] => T) = finder(this)
- }
-
- implicit def findFirst[T1, T2 <: Pair] : Cons[T1, T2] => T1 = (p : Cons[T1, T2]) => p._1
- implicit def findSecond[T, T1, T2 <: Pair](implicit finder : T2 => T) : Cons[T1, T2] => T = (p : Cons[T1, T2]) => finder(p._2)
-
- val p : Cons[Int, Cons[Boolean, End]] = 10 :: false :: End
-// val x : Boolean = p.find[Boolean](findSecond(findFirst))
- val x2 : Boolean = p.find[Boolean] // Doesn't compile
-}
diff --git a/test/files/pos/t0710.scala b/test/files/pos/t0710.scala
index 4512a101d9..fb440bc796 100644
--- a/test/files/pos/t0710.scala
+++ b/test/files/pos/t0710.scala
@@ -1,6 +1,6 @@
object t0710 {
def method {
- sealed case class Parent
+ sealed class Parent
case object Child extends Parent
val x: Parent = Child
x match {
diff --git a/test/files/pos/t1087.scala b/test/files/pos/t1087.scala
deleted file mode 100644
index bb0d7012c1..0000000000
--- a/test/files/pos/t1087.scala
+++ /dev/null
@@ -1,3 +0,0 @@
-case class Foo
-case class Prd (pred : Char => Boolean) extends Foo
-
diff --git a/test/files/pos/typesafecons.scala b/test/files/pos/typesafecons.scala
index b2a027b0f2..5243280160 100644
--- a/test/files/pos/typesafecons.scala
+++ b/test/files/pos/typesafecons.scala
@@ -4,7 +4,7 @@ object Pair {
type Second <: Pair
}
- case class End extends Pair {
+ class End extends Pair {
type First = Nothing
type Second = End