[
https://issues.apache.org/jira/browse/GROOVY-8974?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Eric Milles updated GROOVY-8974:
--------------------------------
Fix Version/s: 2.5.19
> STC ignores declaration type
> ----------------------------
>
> Key: GROOVY-8974
> URL: https://issues.apache.org/jira/browse/GROOVY-8974
> Project: Groovy
> Issue Type: Bug
> Components: Static Type Checker
> Affects Versions: 2.5.5
> Reporter: Daniil Ovchinnikov
> Assignee: Eric Milles
> Priority: Major
> Fix For: 4.0.0-beta-1, 3.0.10, 2.5.19
>
>
> {code:java}
> static <T> T id(T arg) { arg }
> @groovy.transform.CompileStatic
> def ddd() {
> List<String> ls = id(new ArrayList<>())
> ls.get(0).toUpperCase() // Cannot find matching method
> java.lang.Object#toUpperCase()
> }
> println ddd()
> {code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)