diff options
author | Guillaume Martres <smarter@ubuntu.com> | 2017-02-20 11:41:04 +0100 |
---|---|---|
committer | Guillaume Martres <smarter@ubuntu.com> | 2017-02-20 11:54:19 +0100 |
commit | 360406dab1e680ace143a14ee1ea38ebbdacda3c (patch) | |
tree | 70aea422c0613a107cd9d92b04ba37c32efa726f /bin | |
parent | 2245ffd076ece27f874e912cca61ee440626dd56 (diff) | |
download | dotty-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 'bin')
0 files changed, 0 insertions, 0 deletions