summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--test/files/pos/bug443.scala2
-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
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")
+ }
+}