Adding a warning for adapted args and fixed the issues associated with it
This commit is contained in:
parent
8f02b4d7ff
commit
6c13b091fb
5 changed files with 8 additions and 8 deletions
|
|
@ -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) }
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue