fork download
  1. class Foo {
  2. class Bar { // non-private inner class
  3. def someSecretMethod = "I've got ya!"
  4. }
  5. }
  6.  
  7. val foo = new Foo
  8. val wrong = (new foo.Bar).someSecretMethod
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
/opt/scala/bin/scalac: line 50: /dev/null: Permission denied
Main.scala:7: error: expected class or object definition
val foo = new Foo
^
Main.scala:8: error: expected class or object definition
val wrong = (new foo.Bar).someSecretMethod
^
two errors found
spoj: The program compiled successfully, but Main.class was not found.
      Class Main should contain method: def main(args: Array[String]).
stdout
Standard output is empty