diff options
author | Burak Emir <emir@epfl.ch> | 2008-04-09 10:20:04 +0000 |
---|---|---|
committer | Burak Emir <emir@epfl.ch> | 2008-04-09 10:20:04 +0000 |
commit | ed01acd9713e834142e17b68e4ab05fc2bcd347c (patch) | |
tree | 80b120ffad666ad540d4e51bfdb02610bde65f8c /test/files | |
parent | d85738f9e351b1a262e07461ff7b3473d8253855 (diff) | |
download | scala-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')
-rw-r--r-- | test/files/run/patmatnew.scala | 15 |
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 { |