Maik Igloffstein created GROOVY-7972:

             Summary: Strange compilation error with an "as" cast and a nested 
generics map
                 Key: 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 = ''

1 compilation error:

expecting EOF, found 'def' at line: 2, column: 1

{code:title=Good Groovy}
def myMap = [:] as Map<String, Map<String,String> >
def bar = ''

works fine.

Difference lies between _>>_ and _> >_ (with space).

Fix "Bad Groovy" assignment.

This message was sent by Atlassian JIRA

Reply via email to