File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed
Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ import dotty.tools.dotc.ast.{tpd, untpd}
88import dotty .tools .dotc .config .CommandLineParser .tokenize
99import dotty .tools .dotc .config .Properties .{javaVersion , javaVmName , simpleVersionString }
1010import dotty .tools .dotc .core .Contexts ._
11+ import dotty .tools .dotc .core .Decorators ._
1112import dotty .tools .dotc .core .Phases .{unfusedPhases , typerPhase }
1213import dotty .tools .dotc .core .Denotations .Denotation
1314import dotty .tools .dotc .core .Flags ._
@@ -424,8 +425,11 @@ class ReplDriver(settings: Array[String],
424425 case _ =>
425426 setup(tokenize(arg).toArray, rootCtx) match
426427 case Some ((files, ictx)) =>
427- ictx.base.initialize()(using ictx)
428- rootCtx = ictx
428+ inContext(ictx) {
429+ if files.nonEmpty then out.println(i " Ignoring spurious arguments: $files%, % " )
430+ ictx.base.initialize()(using ictx)
431+ rootCtx = ictx
432+ }
429433 case _ =>
430434 state.copy(context = rootCtx)
431435
Original file line number Diff line number Diff line change @@ -2,7 +2,8 @@ scala> def f(thread: Thread) = thread.stop()
22there were 1 deprecation warning(s); re-run with -deprecation for details
33def f(thread: Thread): Unit
44
5- scala>:settings -deprecation
5+ scala>:settings -deprecation foo.scala
6+ Ignoring spurious arguments: foo.scala
67
78scala> def f(thread: Thread) = thread.stop()
891 warning found
You can’t perform that action at this time.
0 commit comments