## Compiler version 3.5.0, same behavior in 2.13.14 ## Minimized code The following code does not print `Hello outer` ```Scala object outer{ println("Hello outer") object Foo } object Test{ def main(args: Array[String]): Unit = println("Hello " + outer.Foo) } ``` But if I wrap the `object outer` in a `trait`, it _does_ print `Hello outer` ```scala trait wrapper{ object outer{ println("Hello outer") object Foo } } object Test{ def main(args: Array[String]): Unit = { println("Hello " + new wrapper{}.outer.Foo) } } ``` ## Expectation I would expect the initialization behavior of nested objects to be consistent regardless of whether or not they are wrapped in traits