Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.4.8
-
None
Description
import static java.util.Arrays.asList @groovy.transform.CompileStatic class Main { final <T> Iterable<T> foo(T instance) { asList(instance) } // next line fails with: [Static type checking] - Cannot call <T> java.util.Arrays#asList(T[]) with arguments [U] final <U> Iterable<U> bar(U instance) { asList(instance) } final Iterable<String> baz(String instance) { asList(instance) } } new Main().with { assert foo('A') + bar('B') + baz('C') == ['A', 'B', 'C'] }
Attachments
Issue Links
- relates to
-
GROOVY-11003 Cannot find method with variable arguments when using fully qualified class names
- Closed
- links to