aboutsummaryrefslogtreecommitdiff
path: root/compiler/src/dotty/tools/dotc/core/TypeOps.scala
diff options
context:
space:
mode:
authorGuillaume Martres <smarter@ubuntu.com>2017-02-20 11:41:04 +0100
committerGuillaume Martres <smarter@ubuntu.com>2017-02-20 11:54:19 +0100
commit360406dab1e680ace143a14ee1ea38ebbdacda3c (patch)
tree70aea422c0613a107cd9d92b04ba37c32efa726f /compiler/src/dotty/tools/dotc/core/TypeOps.scala
parent2245ffd076ece27f874e912cca61ee440626dd56 (diff)
downloaddotty-360406dab1e680ace143a14ee1ea38ebbdacda3c.tar.gz
dotty-360406dab1e680ace143a14ee1ea38ebbdacda3c.tar.bz2
dotty-360406dab1e680ace143a14ee1ea38ebbdacda3c.zip
adjustModuleCompleter: Avoid capturing Context
Previously we computed the scope in `findModuleBuddy` using `this.effectiveScope`, this means that we captured `this` which has a self-type of `Context`, replacing it by `ctx.effectiveScope` would be wrong since we are interested in the scope at the time `adjustModuleCompleter` was called, not the scope at the time the completer is called. Therefore, we have to eagerly compute `this.effectiveScope` so that we don't capture the Context but can use the right scope in `findModuleBuddy`. We also move `findModuleBuddy` to a companion object to avoid accidental captures of `this`. This capture lead to crashes in the IDE.
Diffstat (limited to 'compiler/src/dotty/tools/dotc/core/TypeOps.scala')
0 files changed, 0 insertions, 0 deletions