fork download
  1. class C {
  2. val x : String = y.toString()
  3. val y : Int = 3
  4. }
  5.  
  6. object Main {
  7. def main (Array[String] args) {
  8. println("x = "+(new C()).x)
  9. }
  10. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
Main.scala:7: error: ':' expected but '[' found.
  def main (Array[String] args) {
                 ^
Main.scala:10: error: identifier expected but '}' found.
}
^
two errors found
stdout
Standard output is empty