Skip to content

"super" bug in 3.3.0-RC3 - "missing argument for parameter" #17008

Closed
@jpsacha

Description

@jpsacha

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions