fork download
  1. interface I1 {}
  2. interface I2 {}
  3. class A implements I1, I2 {}
  4.  
  5. def func(I1 i) {
  6. println("I1")
  7. }
  8.  
  9. def func(I2 i) {
  10. println("I2")
  11. }
  12.  
  13. A a = new A()
  14. func(a)
  15.  
Runtime error #stdin #stdout #stderr 1.16s 389056KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
Caught: groovy.lang.GroovyRuntimeException: Ambiguous method overloading for method prog#func.
Cannot resolve which method to invoke for [class A] due to overlapping prototypes between:
	[interface I1]
	[interface I2]
groovy.lang.GroovyRuntimeException: Ambiguous method overloading for method prog#func.
Cannot resolve which method to invoke for [class A] due to overlapping prototypes between:
	[interface I1]
	[interface I2]
	at prog.run(prog.groovy:14)