diff options
author | Martin Odersky <odersky@gmail.com> | 2016-04-03 15:46:39 +0200 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2016-04-03 15:46:39 +0200 |
commit | 27e5c212de05f10177b9ca4375638a2e46929543 (patch) | |
tree | cd1a4d7be5ad8ea656f1a03fa8a7c90f82d1e15d /src | |
parent | f5c220082048f9a7d67548a5619395f97139f088 (diff) | |
download | dotty-27e5c212de05f10177b9ca4375638a2e46929543.tar.gz dotty-27e5c212de05f10177b9ca4375638a2e46929543.tar.bz2 dotty-27e5c212de05f10177b9ca4375638a2e46929543.zip |
Fix comment
Diffstat (limited to 'src')
-rw-r--r-- | src/dotty/tools/dotc/core/Denotations.scala | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/dotty/tools/dotc/core/Denotations.scala b/src/dotty/tools/dotc/core/Denotations.scala index 542e89700..6e7eed3bc 100644 --- a/src/dotty/tools/dotc/core/Denotations.scala +++ b/src/dotty/tools/dotc/core/Denotations.scala @@ -747,9 +747,9 @@ object Denotations { /** Insert this denotation instead of `old`. * Also ensure that `old` refers with `nextInRun` to this denotation - * inserted denotation and set its `validFor` field to `NoWhere`. This - * is important do that references to the old denotation can find via - * current a valid denotation. + * and set its `validFor` field to `NoWhere`. This is necessary so that + * references to the old denotation can be brought forward via `current` + * to a valid denotation. * * The code to achieve this is subtle in that it works correctly * whether the replaced denotation is the only one in its cycle or not. @@ -757,8 +757,9 @@ object Denotations { private def insertInsteadOf(old: SingleDenotation): Unit = { var prev = old while (prev.nextInRun ne old) prev = prev.nextInRun + // order of next two assignments is important! prev.nextInRun = this - this.nextInRun = old.nextInRun // order of previous two assignments is important! + this.nextInRun = old.nextInRun old.validFor = Nowhere } |