summaryrefslogtreecommitdiff
path: root/test/files/run/pf-catch.check
Commit message (Collapse)AuthorAgeFilesLines
* Generalizes catch blocks to include any Partial...Paul Phillips2010-12-031-0/+4
Generalizes catch blocks to include any PartialFunction[Throwable, T]. Existing catch blocks will compile exactly as before. Anything else (which mean: the token after CATCH is not a left brace, or it is a left brace not immediately followed by CASE) is desugared as follows: try body catch expr // becomes try body catch { case x => val catchFn = expr if (catchFn isDefinedAt x) catchFn(x) else throw x } Review by odersky.