diff options
author | Adriaan Moors <adriaan.moors@typesafe.com> | 2014-02-05 11:40:48 -0800 |
---|---|---|
committer | Adriaan Moors <adriaan.moors@typesafe.com> | 2014-02-05 11:40:48 -0800 |
commit | c1aa6c07018925d36c7b4124fb55a1bd4c2cebcf (patch) | |
tree | ee5ca106d8e5362eaaa125f752bc2008bb5af7db /src | |
parent | 852a79285d832fae3e756d6bf21fee51e5baf6ef (diff) | |
parent | b0c4353ea1ad0af81cef31e460746d887ef151e2 (diff) | |
download | scala-c1aa6c07018925d36c7b4124fb55a1bd4c2cebcf.tar.gz scala-c1aa6c07018925d36c7b4124fb55a1bd4c2cebcf.tar.bz2 scala-c1aa6c07018925d36c7b4124fb55a1bd4c2cebcf.zip |
Merge pull request #3457 from retronym/ticket/8228
SI-8228 Avoid infinite loop with erroneous code, overloading
Diffstat (limited to 'src')
-rw-r--r-- | src/compiler/scala/tools/nsc/typechecker/Infer.scala | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/Infer.scala b/src/compiler/scala/tools/nsc/typechecker/Infer.scala index dd0923a696..997fd6fc65 100644 --- a/src/compiler/scala/tools/nsc/typechecker/Infer.scala +++ b/src/compiler/scala/tools/nsc/typechecker/Infer.scala @@ -595,6 +595,7 @@ trait Infer extends Checkable { } private[typechecker] def followApply(tp: Type): Type = tp match { + case _ if tp.isError => tp // SI-8228, `ErrorType nonPrivateMember nme.apply` returns an member with an erroneous type! case NullaryMethodType(restp) => val restp1 = followApply(restp) if (restp1 eq restp) tp else restp1 |