interface I1 {} interface I2 {} class A implements I1, I2 {} def func(I1 i) { println("I1") } def func(I2 i) { println("I2") } A a = new A() func(a)
Standard input is empty
Standard output is empty
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)