diff options
author | Adriaan Moors <adriaan@lightbend.com> | 2017-04-12 09:16:08 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-04-12 09:16:08 -0700 |
commit | 21d12e9f5ec1ffe023f509848911476c1552d06f (patch) | |
tree | 1f18742955bbdc6914c23c739e65f11a738895a3 /src/compiler/scala/tools/nsc/typechecker/Typers.scala | |
parent | 12c240d69b6958d2c8f03a7728c097dd215011cd (diff) | |
parent | 747e22322330a762dd54037ccc1cb3608c6691bd (diff) | |
download | scala-21d12e9f5ec1ffe023f509848911476c1552d06f.tar.gz scala-21d12e9f5ec1ffe023f509848911476c1552d06f.tar.bz2 scala-21d12e9f5ec1ffe023f509848911476c1552d06f.zip |
Merge pull request #5845 from adriaanm/t10261
Actually retract clashing synthetic apply/unapply
Diffstat (limited to 'src/compiler/scala/tools/nsc/typechecker/Typers.scala')
-rw-r--r-- | src/compiler/scala/tools/nsc/typechecker/Typers.scala | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/Typers.scala b/src/compiler/scala/tools/nsc/typechecker/Typers.scala index cd4a883a33..69bf5fdef7 100644 --- a/src/compiler/scala/tools/nsc/typechecker/Typers.scala +++ b/src/compiler/scala/tools/nsc/typechecker/Typers.scala @@ -3168,7 +3168,9 @@ trait Typers extends Adaptations with Tags with TypersTracking with PatternTyper for (sym <- scope) // OPT: shouldAdd is usually true. Call it here, rather than in the outer loop for (tree <- context.unit.synthetics.get(sym) if shouldAdd(sym)) { - newStats += typedStat(tree) // might add even more synthetics to the scope + // if the completer set the IS_ERROR flag, retract the stat (currently only used by applyUnapplyMethodCompleter) + if (!sym.initialize.hasFlag(IS_ERROR)) + newStats += typedStat(tree) // might add even more synthetics to the scope context.unit.synthetics -= sym } // the type completer of a synthetic might add more synthetics. example: if the |