You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was able to narrow down the time when the bug originated to somewhere between 3.3.0-RC1-bin-20221122-794818b-NIGHTLY and 3.3.0-RC1. The bug is still present in 3.3.0-RC2.
Minimized code
class Foo protected (foo: Int = 0) { }
class Bar extends Foo
Output
In Scala 3.2.1 the above code compiles. Bar extends Foo without providing a value for foo, but there is the default value 0 in the superclass constructor so all is good.
In Scala 3.3.0-RC1/RC2 (but not yet in the nightly I specified above) it fails with:
[error] | class Bar extends Foo
[error] | ^^^
[error] |missing argument for parameter foo of constructor Foo in class Foo: (foo: Int):
[error] one error found
It compiles again either if I remove protected from the superclass constructor, or if I provide the value for foo explicitly:
class Foo(foo: Int = 0) { } // this is ok
class Bar extends Foo
// ---
class Foo protected (foo: Int = 0) { }
class Bar extends Foo(0) // this is ok
Expectation
The original minimized code should compile.
The text was updated successfully, but these errors were encountered:
Compiler version
I was able to narrow down the time when the bug originated to somewhere between
3.3.0-RC1-bin-20221122-794818b-NIGHTLY
and3.3.0-RC1
. The bug is still present in3.3.0-RC2
.Minimized code
Output
In Scala 3.2.1 the above code compiles.
Bar
extendsFoo
without providing a value forfoo
, but there is the default value0
in the superclass constructor so all is good.In Scala 3.3.0-RC1/RC2 (but not yet in the nightly I specified above) it fails with:
It compiles again either if I remove
protected
from the superclass constructor, or if I provide the value forfoo
explicitly:Expectation
The original minimized code should compile.
The text was updated successfully, but these errors were encountered: