From ed01acd9713e834142e17b68e4ab05fc2bcd347c Mon Sep 17 00:00:00 2001 From: Burak Emir Date: Wed, 9 Apr 2008 10:20:04 +0000 Subject: fixed 495 again (this fix no longer ignores gua... fixed 495 again (this fix no longer ignores guards), with test --- test/files/run/patmatnew.scala | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'test') 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 { -- cgit v1.2.3