Closed
Description
The following code is rejected by Dotty, but accepted by Scalac:
class Foo(config: String) {
case class Bar(val x: Int) {
def doThings: String = config //Do whatever here
}
}
object Test {
def test(foo: Foo)(bar: foo.Bar = foo.Bar(5)) = ???
test(new Foo("port"))()
}
The error message:
11 | test(new Foo("port"))()
| ^^^^^^^^^^^^^^^^^^^^^
| found: foo$1.Bar
| required: ?1.Bar
|
| where: ?1 is an unknown value of type Foo