Skip to content

Commit c7a5236

Browse files
committed
Adress reviewers comments
1 parent 1eef8dd commit c7a5236

File tree

3 files changed

+3
-7
lines changed

3 files changed

+3
-7
lines changed

compiler/src/dotty/tools/dotc/core/SymDenotations.scala

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,11 +102,10 @@ trait SymDenotations { this: Context =>
102102

103103
/** Configurable: Accept stale symbol with warning if in IDE */
104104
def acceptStale(denot: SingleDenotation): Boolean =
105-
(mode.is(Mode.Interactive) && Config.ignoreStaleInIDE) && {
106-
ctx.warning(denot.staleSymbolMsg)
105+
mode.is(Mode.Interactive) && Config.ignoreStaleInIDE && {
106+
ctx.echo(denot.staleSymbolMsg)
107107
true
108108
}
109-
110109
}
111110

112111
object SymDenotations {

compiler/src/dotty/tools/dotc/interactive/InteractiveCompiler.scala

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,4 @@ class InteractiveCompiler extends Compiler {
1515
override def phases: List[List[Phase]] = List(
1616
List(new FrontEnd)
1717
)
18-
19-
override def rootContext(implicit ctx: Context) =
20-
super.rootContext.fresh.addMode(Mode.Interactive)
2118
}

compiler/src/dotty/tools/dotc/interactive/InteractiveDriver.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class InteractiveDriver(settings: List[String]) extends Driver {
3333
override def sourcesRequired = false
3434

3535
private val myInitCtx: Context = {
36-
val rootCtx = initCtx.fresh.addMode(Mode.ReadPositions)
36+
val rootCtx = initCtx.fresh.addMode(Mode.ReadPositions).addMode(Mode.Interactive)
3737
rootCtx.setSetting(rootCtx.settings.YretainTrees, true)
3838
val ctx = setup(settings.toArray, rootCtx)._2
3939
ctx.initialize()(ctx)

0 commit comments

Comments
 (0)