You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Paul King (Jira)" <ji...@apache.org> on 2023/02/10 21:41:00 UTC
[jira] [Closed] (GROOVY-7157) CompilationError for [[1]] as List>
[ https://issues.apache.org/jira/browse/GROOVY-7157?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Paul King closed GROOVY-7157.
-----------------------------
> CompilationError for [[1]] as List<List<Integer>>
> -------------------------------------------------
>
> Key: GROOVY-7157
> URL: https://issues.apache.org/jira/browse/GROOVY-7157
> Project: Groovy
> Issue Type: Bug
> Components: Compiler
> Affects Versions: 2.3.7, 2.4.0-beta-3
> Reporter: Yu Kobayashi
> Priority: Major
> Fix For: 3.0.0
>
>
> I can run this code,
> {code}
> def list = ([[1]] as List<List<Integer>>)
> println list
> {code}
> but cannot run this code.
> {code}
> def list = [[1]] as List<List<Integer>>
> println list
> {code}
> Error message:
> {code}
> org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
> C:\Users\Yu\Desktop\test.groovy: 2: expecting EOF, found 'println' @ line 2, column 1.
> println list
> ^
> {code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)