diff options
author | Martin Odersky <odersky@gmail.com> | 2016-06-21 17:24:03 +0200 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2016-07-11 13:35:04 +0200 |
commit | 65c26bacbba91850922cfffabfbc6847102bc489 (patch) | |
tree | 24317863cfdf67b37551709755f062d9608de911 /src/dotty/tools | |
parent | 0965e1a33fe27edbaa98e7bdf8a635cbc4e19b7d (diff) | |
download | dotty-65c26bacbba91850922cfffabfbc6847102bc489.tar.gz dotty-65c26bacbba91850922cfffabfbc6847102bc489.tar.bz2 dotty-65c26bacbba91850922cfffabfbc6847102bc489.zip |
Avoid cyclic errors when reading nsc.Global
With the change in the next commit this addition is needed
to make i859.scala compile. Previously the same effect was
achieved accidentally by `updateTypeParams`. The comment
admits that we do not really know why the functionality is needed.
Diffstat (limited to 'src/dotty/tools')
-rw-r--r-- | src/dotty/tools/dotc/core/unpickleScala2/Scala2Unpickler.scala | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/dotty/tools/dotc/core/unpickleScala2/Scala2Unpickler.scala b/src/dotty/tools/dotc/core/unpickleScala2/Scala2Unpickler.scala index 239dd4124..2ea911380 100644 --- a/src/dotty/tools/dotc/core/unpickleScala2/Scala2Unpickler.scala +++ b/src/dotty/tools/dotc/core/unpickleScala2/Scala2Unpickler.scala @@ -135,6 +135,13 @@ object Scala2Unpickler { denot.info = ClassInfo( // final info, except possibly for typeparams ordering denot.owner.thisType, denot.classSymbol, parentRefs, decls, ost) denot.updateTypeParams(tparams) + + // Curiously the following line is needed to make pos/i859.scala compile. + // This test simply accesses scala.tools.nsc.Global. I could not track down why + // the reference is needed - referencing any field of the type parameter + // does the trick, no completion is needed (in fact such completion would + // cause cyclic references elsewhere). + assert(denot.typeParams.forall(_.exists)) } } |