Skip to content

Commit

Permalink
Adress reviewers comments
Browse files Browse the repository at this point in the history
  • Loading branch information
odersky committed Jun 6, 2017
1 parent 1eef8dd commit c7a5236
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 7 deletions.
5 changes: 2 additions & 3 deletions compiler/src/dotty/tools/dotc/core/SymDenotations.scala
Original file line number Diff line number Diff line change
Expand Up @@ -102,11 +102,10 @@ trait SymDenotations { this: Context =>

/** Configurable: Accept stale symbol with warning if in IDE */
def acceptStale(denot: SingleDenotation): Boolean =
(mode.is(Mode.Interactive) && Config.ignoreStaleInIDE) && {
ctx.warning(denot.staleSymbolMsg)
mode.is(Mode.Interactive) && Config.ignoreStaleInIDE && {
ctx.echo(denot.staleSymbolMsg)
true
}

}

object SymDenotations {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,4 @@ class InteractiveCompiler extends Compiler {
override def phases: List[List[Phase]] = List(
List(new FrontEnd)
)

override def rootContext(implicit ctx: Context) =
super.rootContext.fresh.addMode(Mode.Interactive)
}
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class InteractiveDriver(settings: List[String]) extends Driver {
override def sourcesRequired = false

private val myInitCtx: Context = {
val rootCtx = initCtx.fresh.addMode(Mode.ReadPositions)
val rootCtx = initCtx.fresh.addMode(Mode.ReadPositions).addMode(Mode.Interactive)
rootCtx.setSetting(rootCtx.settings.YretainTrees, true)
val ctx = setup(settings.toArray, rootCtx)._2
ctx.initialize()(ctx)
Expand Down

0 comments on commit c7a5236

Please sign in to comment.