scala/scala — pull request #3476 by retronym (2014-02-06 12:09:39+00:00)
Title: SI-8228 Avoid infinite loop with erroneous code, overloading

`isApplicableBasedOnArity` couldn't get of the ferris wheel after
as `followApply` kept insisting on another spin.

scala> ErrorType nonPrivateMember nme.apply
res0: $r.intp.global.Symbol = value apply

scala> res0.info
res1: $r.intp.global.Type =

This commit makes `followApply` consider that an `ErrorType`
does not contain an `apply` member.

Review by @adriaanm

I also considered whether to do a deep check on the type
(`isErroneous`), but I can't motivate this with a test.
I tend to think we *shouldn't* do that: `List[${ErrorType}]`
still has an `apply` member that we should follow, right?