aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/Compiler.scala
diff options
context:
space:
mode:
authorDmitry Petrashko <dark@d-d.me>2015-11-10 15:58:14 +0100
committerDmitry Petrashko <dark@d-d.me>2015-11-10 15:58:14 +0100
commit7cfd3cad248f4b82da61d324c2724e779ddc5fe0 (patch)
tree9b3bf90ed32e557a6e24ff78d74fba034896d97f /src/dotty/tools/dotc/Compiler.scala
parentf8169b4aac2e80ce7e87fcb20c4da23c99806b04 (diff)
parent949c48e0f325afa29ebc70e94de17d525b26386e (diff)
downloaddotty-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.scala5
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)
}