fork download
  1. object Main extends App {
  2. class Foo {
  3. class Bar { // non-private inner class
  4. def someSecretMethod = "I've got ya!"
  5. }
  6. }
  7.  
  8. val foo = new Foo
  9. val wrong = (new foo.Bar).someSecretMethod
  10. println(wrong)
  11. }
Success #stdin #stdout 0.39s 383040KB
stdin
Standard input is empty
stdout
I've got ya!