trait Trait {
def foo(): Unit
}
class Test[A] extends Trait[A] {
override def foo() = ???
}
Compiling with -Xsource:3 -quickfix:any prints
Test.scala:7: error: [rewritten by -quickfix] under -Xsource:3, inferred Unit instead of Nothing
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=Test.foo
override def foo() = ???
^
1 error
and updates the file to
trait Trait {
def foo(): Unit
}
class Test extends Trait {
override def foo: Nothing() = ???
}
which is incorrect
Problem
The type signature should be added after the parameter list, not before it
Reproduction steps
Scala version: 2.13.12
Test.scala:
Compiling with
-Xsource:3 -quickfix:any
printsand updates the file to
which is incorrect
Problem
The type signature should be added after the parameter list, not before it