fork download
  1. interface I1 {}
  2. interface I2 {}
  3. class A implements I1 {}
  4. class B extends A implements I2 {}
  5.  
  6. def func(I1 i) {
  7. println("I1")
  8. }
  9.  
  10. def func(I2 i) {
  11. println("I2")
  12. }
  13.  
  14. A a = new B()
  15. func(a)
Success #stdin #stdout 1.15s 388800KB
stdin
Standard input is empty
stdout
I2