summaryrefslogtreecommitdiff
path: root/test/files
diff options
context:
space:
mode:
Diffstat (limited to 'test/files')
-rw-r--r--test/files/neg/bug414.check2
-rw-r--r--test/files/run/caseclasses.scala9
2 files changed, 10 insertions, 1 deletions
diff --git a/test/files/neg/bug414.check b/test/files/neg/bug414.check
index 3396a803f1..ec23e26337 100644
--- a/test/files/neg/bug414.check
+++ b/test/files/neg/bug414.check
@@ -1,4 +1,4 @@
-bug414.scala:5: error: pattern type is incompatibe with expected type;
+bug414.scala:5: error: pattern type is incompatible with expected type;
found : object Empty
required: IntMap[a]
case Empty =>
diff --git a/test/files/run/caseclasses.scala b/test/files/run/caseclasses.scala
index b971cf3582..3afd7ee162 100644
--- a/test/files/run/caseclasses.scala
+++ b/test/files/run/caseclasses.scala
@@ -4,6 +4,9 @@ case class Bar
case class Baz(override val x: Int, y: Int) extends Foo(x)(y)
+abstract class Base
+abstract case class Abs(x: Int) extends Base
+
object M {
abstract case class C(x: String) {}
object C extends (String => C) {
@@ -16,6 +19,11 @@ object M {
object Test extends Application {
+ def Abs(x: Int) = new Abs(x * 2){}
+ Abs(2) match {
+ case Abs(4) => ;
+ }
+
def fn[a,b](x: a => b) = x;
val f = fn(Foo(1))
(f(2): AnyRef) match {
@@ -46,3 +54,4 @@ object Test extends Application {
}
}
+