[ https://issues.apache.org/jira/browse/GROOVY-7157?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14602647#comment-14602647 ]
Paul King edited comment on GROOVY-7157 at 6/26/15 10:10 AM: ------------------------------------------------------------- And another example which passes the current parser: {code} class Foo { def list = [[1]] as List<List<Integer>> } assert new Foo().list == [[1]] {code} Indicating that field definitions don't suffer the same problem. was (Author: paulk): And another example which passes the current parser: {code} class Foo { def list = [[1]] as List<List<Integer>> } assert new Foo().list == [[1]] {code} > 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 > > 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 (v6.3.4#6332)