Closed
Description
Code that compiled with previous versions of Scala (3.2.2, 3.0.2, 2.13.10, 2.12.17) no longer compiles in 3.3.0-RC3, but removing super.
makes it compile in 3.3.0-RC3
Compiler version
3.3.0-RC3
Minimized code
abstract class A {
protected def foo(text: String, bar: () => Unit = () => ()): Unit = println(s"$text, $bar")
}
class B extends A {
def f1(): Unit = {
super.foo("X")
}
}
Compiler error:
missing argument for parameter bar of method foo in class A: (text: String, bar: () => Unit): Unit
A "workaround" - remove .super
- replace:
super.foo("X")
with
foo("X")
that will make the code compile