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

Paul King updated GROOVY-10960:
-------------------------------
    Fix Version/s:     (was: 5.0.0-alpha-1)

> For multi-assignment type checking of Range expressions, consider reporting 
> an error for cases which have a known size
> ----------------------------------------------------------------------------------------------------------------------
>
>                 Key: GROOVY-10960
>                 URL: https://issues.apache.org/jira/browse/GROOVY-10960
>             Project: Groovy
>          Issue Type: Improvement
>            Reporter: Paul King
>            Assignee: Paul King
>            Priority: Major
>
> Following on from GROOVY-10953 we could consider reporting an error where the 
> RHS of a range expression has a known size and that size is smaller than the 
> number of variables in the multi-assignment, e.g.:
> {code}
> def (a,b,c) = 1..2
> {code}
> For static Groovy, after GROOVY-10953, and always for dynamic Groovy, {{c}} 
> would be null.
> We can exclude this behavior and instead provide an error by adding an 
> additional check.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to