summaryrefslogtreecommitdiff
path: root/test/files/pos/t6145.scala
Commit message (Collapse)AuthorAgeFilesLines
* SI-6145 lax typing of args to synthetic case-labelsAdriaan Moors2012-08-071-0/+11
Use wildcard for the expected type of the arguments of a jump to a label synthesized by the pattern matcher... except during erasure: we must take the expected type into account as it drives the insertion of casts! It's ok since we're typing the translation of well-typed code. The only "type errors" we catch are skolem mismatches. (after erasure the existential types that before caused problems have disappeared.) It's necessary to balance GADT magic, SI-6145, CPS type-driven transforms and other existential trickiness. I've exhausted all other semi-clean approaches I could think of: - the right thing to do -- packing existential types -- runs into limitations in subtyping existential types, - casting breaks SI-6145 (and it's an unnecessary cast at run time), - not casting breaks GADT typing as it requires sneaking ill-typed trees past typer