You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Maik Igloffstein (JIRA)" <ji...@apache.org> on 2016/10/14 13:42:20 UTC
[jira] [Created] (GROOVY-7972) Strange compilation error with an
"as" cast and a nested generics map
Maik Igloffstein created GROOVY-7972:
----------------------------------------
Summary: 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: 2.4.7, 1.8.6
Environment: *
Reporter: Maik Igloffstein
{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)