diff options
author | Dmitry Petrashko <dark@d-d.me> | 2015-11-10 15:58:14 +0100 |
---|---|---|
committer | Dmitry Petrashko <dark@d-d.me> | 2015-11-10 15:58:14 +0100 |
commit | 7cfd3cad248f4b82da61d324c2724e779ddc5fe0 (patch) | |
tree | 9b3bf90ed32e557a6e24ff78d74fba034896d97f /src/dotty/tools/dotc/Compiler.scala | |
parent | f8169b4aac2e80ce7e87fcb20c4da23c99806b04 (diff) | |
parent | 949c48e0f325afa29ebc70e94de17d525b26386e (diff) | |
download | dotty-7cfd3cad248f4b82da61d324c2724e779ddc5fe0.tar.gz dotty-7cfd3cad248f4b82da61d324c2724e779ddc5fe0.tar.bz2 dotty-7cfd3cad248f4b82da61d324c2724e779ddc5fe0.zip |
Merge pull request #928 from dotty-staging/stdlib-definitions
Make Definitions survive recompilation of core definitions.
Diffstat (limited to 'src/dotty/tools/dotc/Compiler.scala')
-rw-r--r-- | src/dotty/tools/dotc/Compiler.scala | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/dotty/tools/dotc/Compiler.scala b/src/dotty/tools/dotc/Compiler.scala index eb8ee8848..42d223fe9 100644 --- a/src/dotty/tools/dotc/Compiler.scala +++ b/src/dotty/tools/dotc/Compiler.scala @@ -5,6 +5,7 @@ import core._ import Contexts._ import Periods._ import Symbols._ +import Types._ import Scopes._ import typer.{FrontEnd, Typer, Mode, ImportInfo, RefChecks} import reporting.{Reporter, ConsoleReporter} @@ -112,8 +113,8 @@ class Compiler { .setMode(Mode.ImplicitsEnabled) .setTyperState(new MutableTyperState(ctx.typerState, rootReporter(ctx), isCommittable = true)) ctx.definitions.init(start) // set context of definitions to start - def addImport(ctx: Context, symf: () => Symbol) = - ctx.fresh.setImportInfo(ImportInfo.rootImport(symf)(ctx)) + def addImport(ctx: Context, refFn: () => TermRef) = + ctx.fresh.setImportInfo(ImportInfo.rootImport(refFn)(ctx)) (start.setRunInfo(new RunInfo(start)) /: defn.RootImportFns)(addImport) } |