Closed
Description
scala> object Foo {
| val bar = new Object {
| def baz = 1
| }
|
| bar.baz
| }
warning: there was one feature warning; re-run with -feature for details
defined object Foo
scala> Foo.bar.baz
warning: there was one feature warning; re-run with -feature for details
res0: Int = 1
dotty> object Foo {
val bar = new Object {
def baz = 1
}
bar.baz
}
^
bar.baz
<console>:9: error: baz is not a member of Object(line2$object.$iw.$iw.Foo.bar)