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 19:08:00 UTC

[jira] [Resolved] (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 resolved GROOVY-10636.
----------------------------------
    Fix Version/s: 5.0.0-alpha-1
       Resolution: Fixed

https://github.com/apache/groovy/commit/496748a118a51b2dad33f9fd03a8039a1cf0127d

> 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
>             Fix For: 5.0.0-alpha-1
>
>
> 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)