scala/scala — pull request #1168 by retronym (2012-08-20 20:48:37+00:00)
Title: SI-6258 Reject partial funs with undefined param types

This regressed with virtpatmat.

With -Xoldpatmat, pattern matching anonymous functions with
an expected type of PartialFunction[A, B] are translated to
a Function tree, and typed by typedFunction, which issues an
error of the parameter types are not fully defined.

This commit adds the same check to MatchFunTyper.

It doesn't plug the hole in RefChecks#validateVariance (which is
reminiscent of SI-3577.) Seems to me that in general one should handle:
a) both BoundedWildcardType and WildcardType
when in a place that can be called during inference, or
b) neither otherwise

I'm submitting to 2.10.x seeing as it's a regression and the fix is trivial.

Review by @paulp