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 2022/05/25 17:02:00 UTC

[jira] [Updated] (GROOVY-10636) STC: closure array or varargs parameter not properly type-checked

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

Eric Milles updated GROOVY-10636:
---------------------------------
    Summary: STC: closure array or varargs parameter not properly type-checked  (was: STC: closure array or varargs parameter not type-checked properly)

> STC: closure array or varargs parameter not properly type-checked
> -----------------------------------------------------------------
>
>                 Key: GROOVY-10636
>                 URL: https://issues.apache.org/jira/browse/GROOVY-10636
>             Project: Groovy
>          Issue Type: Bug
>          Components: Static Type Checker
>            Reporter: Eric Milles
>            Assignee: Eric Milles
>            Priority: Minor
>
> Consider the following:
> {code:groovy}
> def m(Closure<Number>... closures) {
>   closures*.call().sum()
> }
> @groovy.transform.TypeChecked
> void test() {
>   print m({->1},{->'2'})
> }
> {code}
> No error is given for the improper String return type.



--
This message was sent by Atlassian Jira
(v8.20.7#820007)