Adding a warning for adapted args and fixed the issues associated with it

This commit is contained in:
Viktor Klang 2012-07-25 15:29:00 +02:00
parent 8f02b4d7ff
commit 6c13b091fb
5 changed files with 8 additions and 8 deletions

View file

@ -96,7 +96,7 @@ abstract class PurePartialFunction[A, B] extends scala.runtime.AbstractFunction1
def apply(x: A, isCheck: Boolean): B
final def isDefinedAt(x: A): Boolean = try { apply(x, true); true } catch { case NoMatch false }
final def apply(x: A): B = try apply(x, false) catch { case NoMatch throw new MatchError }
final def apply(x: A): B = try apply(x, false) catch { case NoMatch throw new MatchError(x) }
}
/**