AndreyT created GROOVY-8015:
-------------------------------

             Summary: Strange groovy behavior
                 Key: GROOVY-8015
                 URL: https://issues.apache.org/jira/browse/GROOVY-8015
             Project: Groovy
          Issue Type: Bug
    Affects Versions: 2.4.5
         Environment: groovy -v
Groovy Version: 2.4.5 JVM: 1.8.0_112 Vendor: Oracle Corporation OS: Linux

java -version
java version "1.8.0_112"
Java(TM) SE Runtime Environment (build 1.8.0_112-b15)
Java HotSpot(TM) 64-Bit Server VM (build 25.112-b15, mixed mode)

            Reporter: AndreyT
            Priority: Trivial


```
String s = 'anyString'
Long l = 1

def m = [(s): [1]] as Map<String,List<Long>>
def g = 1
```

Code above cause exception:

```
org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
/tmp/t.groovy: 5: expecting EOF, found 'def' @ line 5, column 1.
```

If add `;` at the end of `def m = [(s): [1]] as Map<String,List<Long>>`, then 
all works fine.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to