You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Pascal Schumacher (JIRA)" <ji...@apache.org> on 2015/11/15 11:30:11 UTC
[jira] [Updated] (GROOVY-7130) Static type checker fails to compile
spread operator assignment + map constructor
[ https://issues.apache.org/jira/browse/GROOVY-7130?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Pascal Schumacher updated GROOVY-7130:
--------------------------------------
Affects Version/s: 2.4.5
> Static type checker fails to compile spread operator assignment + map constructor
> ---------------------------------------------------------------------------------
>
> Key: GROOVY-7130
> URL: https://issues.apache.org/jira/browse/GROOVY-7130
> Project: Groovy
> Issue Type: Bug
> Components: Static Type Checker
> Affects Versions: 2.3.6, 2.4.5
> Reporter: Maxim Medvedev
> Assignee: Cédric Champeau
>
> {code}
> class A {
> int anInt
> }
> @groovy.transform.CompileStatic
> def foo1() {
> List l = [new A(), new A(), new A()]
> l*.anA = [anInt: 500] as A // compiler accepts such an assignment
> l*.anA = [anInt: 100] //compiler fails here
> }
> {code}
> The code works well without @CompileStatic
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)