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 2023/01/26 18:09:00 UTC
[jira] [Updated] (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 updated GROOVY-6912:
--------------------------------
Fix Version/s: 3.0.15
> @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, 3.0.15
>
>
> 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.20.10#820010)