## Compiler version 3.3.5, 3.4.3, 3.5.2, 3.6.3 ## Minimized code ```scala // test1.scala package example private def foobar: String = "foo" object test1 { val x = foobar } // test2.scala package example private def foobar: Int = 1 object test2 { val x = foobar } ``` ## Output In the console: ```scala scala> example.test1.x val res0: String = foo scala> example.test2.x val res1: String = foo ``` ## Expectation Ideally the calls to `foobar` would be scoped properly in each file but I'm guessing that's hard, so at least a compiler warning or error would be nice.