diff options
author | Martin Odersky <odersky@gmail.com> | 2007-06-22 13:01:42 +0000 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2007-06-22 13:01:42 +0000 |
commit | c717018a844dd547eec04ed95dc9edaa4dd9c2d3 (patch) | |
tree | bad4cd654574ff4a67d63ceebcd62f7498b04df3 /test | |
parent | b5df8e35174b78f7ab83ed0483af47b41fbbeae7 (diff) | |
download | scala-c717018a844dd547eec04ed95dc9edaa4dd9c2d3.tar.gz scala-c717018a844dd547eec04ed95dc9edaa4dd9c2d3.tar.bz2 scala-c717018a844dd547eec04ed95dc9edaa4dd9c2d3.zip |
fixed test files.
Diffstat (limited to 'test')
-rw-r--r-- | test/files/pos/bug443.scala | 2 | ||||
-rw-r--r-- | test/files/run/Course-2002-07.scala | 2 | ||||
-rw-r--r-- | test/files/run/unboxmatch.check | 2 | ||||
-rw-r--r-- | test/files/run/unboxmatch.scala | 10 |
4 files changed, 14 insertions, 2 deletions
diff --git a/test/files/pos/bug443.scala b/test/files/pos/bug443.scala index 5b83e9d2cb..5b5e3ea828 100644 --- a/test/files/pos/bug443.scala +++ b/test/files/pos/bug443.scala @@ -1,7 +1,7 @@ object Test { def lookup(): Option[Pair[String, String]] = - (null: Option[Pair[String, String]]) match { + ((null: Option[Pair[String, String]]) : @unchecked) match { case Some(Pair(_, _)) => if (true) Some(Pair(null, null)) diff --git a/test/files/run/Course-2002-07.scala b/test/files/run/Course-2002-07.scala index 2f40b96d4f..b084a35e73 100644 --- a/test/files/run/Course-2002-07.scala +++ b/test/files/run/Course-2002-07.scala @@ -217,7 +217,7 @@ object M5 { object M6 { - def zipFun[a,b](xs:List[a], ys:List[b]):List[Pair[a,b]] = Pair(xs,ys) match { + def zipFun[a,b](xs:List[a], ys:List[b]):List[Pair[a,b]] = (Pair(xs,ys): @unchecked) match { // !!! case Pair(List(), _), Pair(_, List()) => List() case Pair(x :: xs1, y :: ys1) => Pair(x, y) :: zipFun(xs1, ys1) } diff --git a/test/files/run/unboxmatch.check b/test/files/run/unboxmatch.check new file mode 100644 index 0000000000..e14f671011 --- /dev/null +++ b/test/files/run/unboxmatch.check @@ -0,0 +1,2 @@ +(1,abc,true) +OK diff --git a/test/files/run/unboxmatch.scala b/test/files/run/unboxmatch.scala new file mode 100644 index 0000000000..e354798ebd --- /dev/null +++ b/test/files/run/unboxmatch.scala @@ -0,0 +1,10 @@ +object Test extends Application { + var xyz: (int, String, boolean) = _ + xyz = (1, "abc", true) + Console.println(xyz) + xyz._1 match { + case 1 => Console.println("OK") + case 2 => Console.println("KO") + case 3 => Console.println("KO") + } +} |