summaryrefslogtreecommitdiff
path: root/test/files/run
diff options
context:
space:
mode:
Diffstat (limited to 'test/files/run')
-rw-r--r--test/files/run/Course-2002-07.scala2
-rw-r--r--test/files/run/unboxmatch.check2
-rw-r--r--test/files/run/unboxmatch.scala10
3 files changed, 13 insertions, 1 deletions
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")
+ }
+}