scala/scala — pull request #1064 by adriaanm (2012-08-06 18:30:21+00:00)
Title: SI-6145 special-case typing of jumps to match labels

I've tried casting, packing existentials, setting the type directly,
to balance GADT magic, SI-6145 and other existential trickiness, CPS's type-driven translation.

I think special-casing applications of matchEnd is ok since we're type checking
the translation of well-typed code. The only "type errors" we catch are skolem mismatches.
However, if you pack the skolem for matchEnd's argument type, you run into limitations of subtyping on existential types.

(I'll assign a reviewer later.)