You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Eric Milles (Jira)" <ji...@apache.org> on 2019/10/29 15:38:00 UTC
[jira] [Commented] (GROOVY-8974) STC ignores declaration type
[ https://issues.apache.org/jira/browse/GROOVY-8974?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16962126#comment-16962126 ]
Eric Milles commented on GROOVY-8974:
-------------------------------------
See also GROOVY-9064
> 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
> Priority: Major
>
> {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.3.4#803005)