aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/core/SymDenotations.scala
diff options
context:
space:
mode:
authorDmitry Petrashko <dmitry.petrashko@gmail.com>2015-04-02 16:11:20 +0200
committerDmitry Petrashko <dmitry.petrashko@gmail.com>2015-04-02 16:30:16 +0200
commite5618d29e37ad50bd1b8c591ed50db63a6d7bc79 (patch)
tree1d53beeccaaddcfa20e2080a4c7e0feffab673c5 /src/dotty/tools/dotc/core/SymDenotations.scala
parentc560648f191f325cc1961f25fdbad48839ca6327 (diff)
downloaddotty-e5618d29e37ad50bd1b8c591ed50db63a6d7bc79.tar.gz
dotty-e5618d29e37ad50bd1b8c591ed50db63a6d7bc79.tar.bz2
dotty-e5618d29e37ad50bd1b8c591ed50db63a6d7bc79.zip
Simplify methods implemented in #436
Diffstat (limited to 'src/dotty/tools/dotc/core/SymDenotations.scala')
-rw-r--r--src/dotty/tools/dotc/core/SymDenotations.scala8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/dotty/tools/dotc/core/SymDenotations.scala b/src/dotty/tools/dotc/core/SymDenotations.scala
index 0ee633861..9889bc89c 100644
--- a/src/dotty/tools/dotc/core/SymDenotations.scala
+++ b/src/dotty/tools/dotc/core/SymDenotations.scala
@@ -1286,7 +1286,11 @@ object SymDenotations {
def enter(sym: Symbol, scope: Scope = EmptyScope)(implicit ctx: Context): Unit = {
val mscope = scope match {
case scope: MutableScope =>
- assert(this.nextInRun == this) // we are not going to bring this symbol into future
+ // if enter gets a scope as an argument,
+ // than this is a scope that will eventually become decls of this symbol.
+ // And this should only happen if this is first time the scope of symbol
+ // is computed, ie symbol yet has no future.
+ assert(this.nextInRun == this)
scope
case _ => unforcedDecls.openForMutations
}
@@ -1300,7 +1304,7 @@ object SymDenotations {
}
enterNoReplace(sym, mscope)
val nxt = this.nextInRun
- if((nxt ne this) && (nxt.validFor.code > this.validFor.code)) {
+ if (nxt.validFor.code > this.validFor.code) {
this.nextInRun.asSymDenotation.asClass.enter(sym)
}
}