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/02/26 18:20:00 UTC
[jira] [Updated] (GROOVY-10071) SC: closure with variadic parameter
[ https://issues.apache.org/jira/browse/GROOVY-10071?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Eric Milles updated GROOVY-10071:
---------------------------------
Fix Version/s: 3.0.10
> SC: closure with variadic parameter
> -----------------------------------
>
> Key: GROOVY-10071
> URL: https://issues.apache.org/jira/browse/GROOVY-10071
> Project: Groovy
> Issue Type: Bug
> Components: Static compilation, Static Type Checker
> Affects Versions: 2.5.14, 3.0.8, 4.0.0-alpha-3
> Reporter: Eric Milles
> Assignee: Eric Milles
> Priority: Major
> Fix For: 4.0.0-beta-1, 3.0.10
>
>
> Consider the following:
> {code:groovy}
> @groovy.transform.CompileStatic
> void test() {
> def c = { ... zeroOrMore -> return 'foo' + zeroOrMore }
> assert c('bar', 'baz') == 'foo[bar, baz]'
> assert c('bar') == 'foo[bar]'
> assert c() == 'foo[]'
> }
> test()
> {code}
--
This message was sent by Atlassian Jira
(v8.20.1#820001)