summaryrefslogtreecommitdiff
path: root/test/files/run/patmatnew.scala
diff options
context:
space:
mode:
authorBurak Emir <emir@epfl.ch>2008-04-09 10:20:04 +0000
committerBurak Emir <emir@epfl.ch>2008-04-09 10:20:04 +0000
commited01acd9713e834142e17b68e4ab05fc2bcd347c (patch)
tree80b120ffad666ad540d4e51bfdb02610bde65f8c /test/files/run/patmatnew.scala
parentd85738f9e351b1a262e07461ff7b3473d8253855 (diff)
downloadscala-ed01acd9713e834142e17b68e4ab05fc2bcd347c.tar.gz
scala-ed01acd9713e834142e17b68e4ab05fc2bcd347c.tar.bz2
scala-ed01acd9713e834142e17b68e4ab05fc2bcd347c.zip
fixed 495 again (this fix no longer ignores gua...
fixed 495 again (this fix no longer ignores guards), with test
Diffstat (limited to 'test/files/run/patmatnew.scala')
-rw-r--r--test/files/run/patmatnew.scala15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/files/run/patmatnew.scala b/test/files/run/patmatnew.scala
index 6ec3928757..d78be53eef 100644
--- a/test/files/run/patmatnew.scala
+++ b/test/files/run/patmatnew.scala
@@ -824,6 +824,21 @@ object Test extends TestConsoleMain {
}
}
+ object Ticket495bis { // compile-only
+ def signum(x: Int): Int =
+ x match {
+ case 0 => 0
+ case _ if x < 0 => -1
+ case _ if x > 0 => 1
+ }
+ def pair_m(x: Int, y: Int) =
+ (x,y) match {
+ case (_, 0) => 0
+ case (-1, _) => -1
+ case (_, _) => 1
+ }
+ }
+
object Ticket522 { // compile-only
class Term[X]
object App {