Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
Description
Follow up from GROOVY-9570. When the method is not a DGM, there is a slightly different path through STC and the same error is currently given.
import groovy.transform.stc.* @groovy.transform.TypeChecked class C<I extends Item> { Queue<I> queue def c = { -> x(queue) { I item -> println item } } def m() { x(queue) { I item -> println item } } def <T> T x(Collection<T> y, @ClosureParams(FirstParam.FirstGenericType) Closure<?> z) { } } interface Item {} new C()
Both instances of "I item" are flagged with the same error described in GROOVY-9570