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 2021/03/28 18:40:00 UTC

[jira] [Resolved] (GROOVY-6912) @CompileStatic not recognising Literal list when LHS is a concrete list type

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

Eric Milles resolved GROOVY-6912.
---------------------------------
    Resolution: Fixed

> @CompileStatic not recognising Literal list when LHS is a concrete list type
> ----------------------------------------------------------------------------
>
>                 Key: GROOVY-6912
>                 URL: https://issues.apache.org/jira/browse/GROOVY-6912
>             Project: Groovy
>          Issue Type: Bug
>          Components: Static Type Checker
>    Affects Versions: 2.3.3, 2.4.0-beta-1
>            Reporter: Paul King
>            Assignee: Eric Milles
>            Priority: Major
>             Fix For: 4.0.0-alpha-3
>
>
> Compiling this code:
> {code}
> @CompileStatic
> class X {
>     ArrayList list = [1,2,3]
> }
> {code}
> or this:
> {code}
> @CompileStatic
> def method() {
>     ArrayList list = [1,2,3]
> }
> {code}
> gives:
> {noformat}
> [Static type checking] - No matching constructor found: java.util.ArrayList <E extends java.lang.Object -> java.lang.Object><init>(int, int, int)
> {noformat}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)