Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.2.2
-
None
Description
This groovy code has a compilation error:
import groovy.transform.TypeChecked interface Ifc { Object getProperty(String s) } class DuplicateMethodInIfc implements Ifc // implemented in groovy.lang.GroovyObject { } @TypeChecked class Tester { DuplicateMethodInIfc dup = new DuplicateMethodInIfc() Object obj = dup.getProperty("foo") // <== Error here }
The error is: DuplicateMethodInIfc.groovy: 16: [Static type checking] - Reference to method is ambiguous. Cannot choose between [java.lang.Object
Ifc#getProperty(java.lang.String), java.lang.Object groovy.lang.GroovyObject#getProperty(java.lang.String)]