fork download
  1. trait Foo{
  2. var x = 0
  3. }
  4.  
  5. object Main extends App{
  6. val a = new Object() with Foo
  7. println(a.x)
  8. a.x += 1
  9. println(a.x)
  10. }
Success #stdin #stdout 0.3s 247488KB
stdin
Standard input is empty
stdout
0
1