fork(1) download
  1. case class A(p1: Int, p2: Double)
  2.  
  3. object Main extends App {
  4. val a = A(5, 6.0)
  5. val (b, c: String) = a
  6. val (d, e, f) = a
  7.  
  8. println(a)
  9. println(b)
  10. println(c)
  11. println(d)
  12. println(e)
  13. println(f)
  14. }
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:5: error: constructor cannot be instantiated to expected type;
 found   : (T1, T2)
 required: A
	val (b, c: String) = a
            ^
Main.scala:5: error: recursive value x$1 needs type
	val (b, c: String) = a
             ^
Main.scala:6: error: constructor cannot be instantiated to expected type;
 found   : (T1, T2, T3)
 required: A
	val (d, e, f) = a
            ^
Main.scala:6: error: recursive value x$2 needs type
	val (d, e, f) = a
             ^
four 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