diff options
author | Adriaan Moors <adriaan.moors@typesafe.com> | 2015-02-09 13:34:55 -0800 |
---|---|---|
committer | Adriaan Moors <adriaan.moors@typesafe.com> | 2015-02-09 13:34:55 -0800 |
commit | 9d09247f13b8a77c1b3a2bb5d44510b7cec38dce (patch) | |
tree | 25deb95b818b8ae5f91dbc513dbb3cea6a52bf72 /src/compiler | |
parent | 2b6a197d4ac11070699131808f0baf203553e86b (diff) | |
parent | 1970a8315ed3b2ff8877dfef2afcee936d59871b (diff) | |
download | scala-9d09247f13b8a77c1b3a2bb5d44510b7cec38dce.tar.gz scala-9d09247f13b8a77c1b3a2bb5d44510b7cec38dce.tar.bz2 scala-9d09247f13b8a77c1b3a2bb5d44510b7cec38dce.zip |
Merge pull request #4288 from adriaanm/retronym-ticket/9041
SI-9041 Avoid unreported type error with overloading, implicits
Diffstat (limited to 'src/compiler')
-rw-r--r-- | src/compiler/scala/tools/nsc/typechecker/Typers.scala | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/Typers.scala b/src/compiler/scala/tools/nsc/typechecker/Typers.scala index 6e5f61db1a..e4255e5333 100644 --- a/src/compiler/scala/tools/nsc/typechecker/Typers.scala +++ b/src/compiler/scala/tools/nsc/typechecker/Typers.scala @@ -825,6 +825,16 @@ trait Typers extends Adaptations with Tags with TypersTracking with PatternTyper } orElse { _ => val resetTree = resetAttrs(original) + resetTree match { + case treeInfo.Applied(fun, targs, args) => + if (fun.symbol != null && fun.symbol.isError) + // SI-9041 Without this, we leak error symbols past the typer! + // because the fallback typechecking notices the error-symbol, + // refuses to re-attempt typechecking, and presumes that someone + // else was responsible for issuing the related type error! + fun.setSymbol(NoSymbol) + case _ => + } debuglog(s"fallback on implicits: ${tree}/$resetTree") val tree1 = typed(resetTree, mode) // Q: `typed` already calls `pluginsTyped` and `adapt`. the only difference here is that |