Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
3.0.0, 4.0.6
-
None
Description
Using org.codehaus.groovy:groovy-dateutil:
import groovy.time.Duration import groovy.time.TimeDuration // GROOVY-10818 @groovy.transform.TypeChecked Duration sum(TimeDuration td1, TimeDuration td2) { td1 + td2 // TimeDuration#plus(Duration) vs Duration#plus(TimeDuration) } sum(new TimeDuration(0, 1, 20, 43, 0), new TimeDuration(0, 0, 20, 17, 0))
Compilation error:
Reference to method is ambiguous. Cannot choose between [groovy.time.Duration groovy.time.TimeDuration#plus(groovy.time.Duration), groovy.time.Duration groovy.time.Duration#plus(groovy.time.TimeDuration)]