aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/Compiler.scala
diff options
context:
space:
mode:
authorDmitry Petrashko <dmitry.petrashko@gmail.com>2014-03-27 12:53:03 +0100
committerDmitry Petrashko <dmitry.petrashko@gmail.com>2014-03-27 15:02:53 +0100
commit97faee5a82b40b4c980c8cb222ff5ac4cb9083a4 (patch)
tree760353c5f86d35d473a54ba2ba71a4b0f55ddd41 /src/dotty/tools/dotc/Compiler.scala
parenta6419fbd80bb63413de671af331ae35da4fa4e1b (diff)
downloaddotty-97faee5a82b40b4c980c8cb222ff5ac4cb9083a4.tar.gz
dotty-97faee5a82b40b4c980c8cb222ff5ac4cb9083a4.tar.bz2
dotty-97faee5a82b40b4c980c8cb222ff5ac4cb9083a4.zip
Rename methods on FreshContext to make mutation obvious
And avoid name clashes
Diffstat (limited to 'src/dotty/tools/dotc/Compiler.scala')
-rw-r--r--src/dotty/tools/dotc/Compiler.scala16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/dotty/tools/dotc/Compiler.scala b/src/dotty/tools/dotc/Compiler.scala
index 286ed3456..7b657b47b 100644
--- a/src/dotty/tools/dotc/Compiler.scala
+++ b/src/dotty/tools/dotc/Compiler.scala
@@ -42,18 +42,18 @@ class Compiler {
ctx.usePhases(phases)
val rootScope = new MutableScope
val bootstrap = ctx.fresh
- .withPeriod(Period(nextRunId, FirstPhaseId))
- .withScope(rootScope)
+ .setPeriod(Period(nextRunId, FirstPhaseId))
+ .setScope(rootScope)
rootScope.enter(ctx.definitions.RootPackage)(bootstrap)
val start = bootstrap.fresh
- .withOwner(defn.RootClass)
- .withTyper(new Typer)
- .withNewMode(Mode.ImplicitsEnabled)
- .withTyperState(new MutableTyperState(ctx.typerState, new ConsoleReporter()(ctx), isCommittable = true))
+ .setOwner(defn.RootClass)
+ .setTyper(new Typer)
+ .setMode(Mode.ImplicitsEnabled)
+ .setTyperState(new MutableTyperState(ctx.typerState, new ConsoleReporter()(ctx), isCommittable = true))
ctx.definitions.init(start) // set context of definitions to start
def addImport(ctx: Context, sym: Symbol) =
- ctx.fresh.withImportInfo(ImportInfo.rootImport(sym)(ctx))
- (start.withRunInfo(new RunInfo(start)) /: defn.RootImports)(addImport)
+ ctx.fresh.setImportInfo(ImportInfo.rootImport(sym)(ctx))
+ (start.setRunInfo(new RunInfo(start)) /: defn.RootImports)(addImport)
}
def newRun(implicit ctx: Context): Run = {