fork download
  1. object Main extends App {
  2. def foo(x:Object){ return x.asInstanceOf[A with IB]}
  3. foo(new SubA());
  4. foo(new A());
  5. }
  6. class A{}
  7. trait IB{}
  8. class SubA extends A with IB{}
  9.  
Success #stdin #stdout 0.23s 322048KB
stdin
Standard input is empty
stdout
Standard output is empty