Skip to content

Commit a11f887

Browse files
committed
Fix #7644: silence debug warnings in REPL
Otherwise, we will print the following in the REPL, which should not be the default. stale symbol; module class rs$line$1$#2503 in module class <empty>, defined in Period(1..4, run = 2), is referred to in run Period(1..1, run = 3) stale symbol; class T#3334 in module class rs$line$1$, defined in Period(1..4, run = 2), is referred to in run Period(1..1, run = 3)
1 parent 8a5b198 commit a11f887

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ trait SymDenotations { this: Context =>
117117
/** Possibly accept stale symbol with warning if in IDE */
118118
def acceptStale(denot: SingleDenotation): Boolean =
119119
staleOK && {
120-
ctx.echo(denot.staleSymbolMsg)
120+
ctx.debugwarn(denot.staleSymbolMsg)
121121
true
122122
}
123123
}

compiler/test-resources/repl/i7644

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
scala> class T extends Eql
2+
1 | class T extends Eql
3+
| ^
4+
| Cannot extend sealed trait Eql in a different source file
5+
1 | class T extends Eql
6+
| ^^^
7+
| Missing type parameter for Eql
8+
scala> class T extends Eql
9+
1 | class T extends Eql
10+
| ^
11+
| Cannot extend sealed trait Eql in a different source file
12+
1 | class T extends Eql
13+
| ^^^
14+
| Missing type parameter for Eql

0 commit comments

Comments
 (0)