You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Paul King (Jira)" <ji...@apache.org> on 2022/02/03 22:35:02 UTC

[jira] [Closed] (GROOVY-8974) STC ignores declaration type

     [ https://issues.apache.org/jira/browse/GROOVY-8974?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Paul King closed GROOVY-8974.
-----------------------------

> 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
>
>
> {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.1#820001)