scala-2.13.12/bin/scalac -quickfix:any -Xsource:3 Test2.scala Test1.scala prints
Test1.scala:5: error: [rewritten by -quickfix] under -Xsource:3, inferred Option[Any] instead of None.type
Scala 3 migration messages are errors under -Xsource:3. Use -Wconf / @nowarn to filter them or add -Xmigration to demote them to warnings.
Applicable -Wconf / @nowarn filters for this fatal warning: msg=<part of the message>, cat=scala3-migration, site=Test1.foo
def foo = None
^
1 error
but it doesn't actually change Test1.scala at all. If you swap the order the files are provided in the command line, or if you remove the .foo in Test2.scala, the quickfix for Test1.scala gets applied as expected. I.e., scala-2.13.12/bin/scalac -quickfix:any -Xsource:3 Test1.scala Test2.scala has the same output but it actually updates Test1.scala.
Problem
The order of source files passed to scalac shouldn't affect whether quickfixes are applied or not
Reproduction steps
Scala version: 2.13.12
in Test1.scala:
in Test2.scala:
scala-2.13.12/bin/scalac -quickfix:any -Xsource:3 Test2.scala Test1.scala
printsbut it doesn't actually change Test1.scala at all. If you swap the order the files are provided in the command line, or if you remove the
.foo
in Test2.scala, the quickfix for Test1.scala gets applied as expected. I.e.,scala-2.13.12/bin/scalac -quickfix:any -Xsource:3 Test1.scala Test2.scala
has the same output but it actually updates Test1.scala.Problem
The order of source files passed to scalac shouldn't affect whether quickfixes are applied or not