groovy-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Maximilian Michels (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (GROOVY-7130) Static type checker fails to compile spread operator assignment + map constructor
Date Thu, 04 Jun 2015 12:38:38 GMT

    [ https://issues.apache.org/jira/browse/GROOVY-7130?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14572687#comment-14572687
] 

Maximilian Michels commented on GROOVY-7130:
--------------------------------------------

I didn't report this issue :) You probably have confused me with somebody else.

> 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
>            Reporter: Maximilian Michels
>            Assignee: C├ędric Champeau
>
> {code}
> class A {
>     int anInt
> }
> @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)

Mime
View raw message