scala/scala — pull request #2011 by retronym (2013-01-29 21:05:10+00:00)
Title: SI-6187 Make partial functions re-typable

- New(tpe) doesn't survive a resetAttrs / typecheck; use
a name instead.
- Abandon the tree attachment that passed the default
case from `typer` to `patmat`; this tree eluded the
attribute reset performed in the macro. Instead, add it
to the match. Apart from making the tree re-typable, it
also exposes the true code structure to macros, which
is important if they need to perform other code
transformations.

I could only get this through run/t6187.scala by generating
a cast; otherwise upon retypchecking we ran into incompatible
type parameter skolems.

Review by @adriaanm

I'm using `typedCase` now, based on your prior review. No luck avoiding the cast.