scala/scala — pull request #1877 by adriaanm (2013-01-10 01:16:51+00:00)
Title: SI-5189 detect unsoundness when inferring type of match

GADT skolems encode type slack that results from pattern matching on variant type constructors. I thought they would not longer be relevant after cases have been typed,
and since they caused weird issues with the old pattern matcher, I deskolemized in typedCase

however, when we don't have an expected type for the match, we need to keep the skolems around until the skolemized type makes it out of the match and it becomes the result of type inference for that match when you do have an expected type, it will propagate to the case-level and the confrontation will thus already take place when typing individual cases

[foward port of #1876]