Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
2.1.1
-
None
Description
For List implementors which extend Object, some methods (e.g., find) are considered ambiguous, although the List implementation should win.
Test case:
86 /tmp> >q.groovy class Mylist implements List {} @groovy.transform.TypeChecked class t { def whatthe(Mylist a) { a.find { true } } } 87 /tmp> groovyc q.groovy
org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed: q.groovy: 4: [Static type checking] - Reference to method is ambiguous. Cannot choose between [java.lang.Object <T> java.util.Collection <T>#find(groovy.lang.Closure), java.lang.Object java.lang.Object#find(groovy.lang.Closure)]