You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Daniel Sun (JIRA)" <ji...@apache.org> on 2017/01/20 02:05:26 UTC
[jira] [Closed] (GROOVY-7972) Strange compilation error with an
"as" cast and a nested generics map
[ https://issues.apache.org/jira/browse/GROOVY-7972?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Daniel Sun closed GROOVY-7972.
------------------------------
Resolution: Duplicate
> Strange compilation error with an "as" cast and a nested generics map
> ---------------------------------------------------------------------
>
> Key: GROOVY-7972
> URL: https://issues.apache.org/jira/browse/GROOVY-7972
> Project: Groovy
> Issue Type: Bug
> Components: parser
> Affects Versions: 1.8.6, 2.4.7
> Environment: *
> Reporter: Maik Igloffstein
> Assignee: Daniel Sun
>
> {code:title=Bad Groovy}
> def myMap = [:] as Map<String, Map<String,String>>
> def foo = ''
> {code}
> tells:
> {code:title=Error}
> 1 compilation error:
> expecting EOF, found 'def' at line: 2, column: 1
> {code}
> but:
> {code:title=Good Groovy}
> def myMap = [:] as Map<String, Map<String,String> >
> def bar = ''
> {code}
> works fine.
> Difference lies between _>>_ and _> >_ (with space).
> Fix "Bad Groovy" assignment.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)