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] [Assigned] (GROOVY-8015) Strange groovy behavior
[ https://issues.apache.org/jira/browse/GROOVY-8015?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Daniel Sun reassigned GROOVY-8015:
----------------------------------
Assignee: Daniel Sun
> 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
> Assignee: Daniel Sun
> Priority: Trivial
>
> {code}
> String s = 'anyString'
> Long l = 1
> def m = [(s): [l]] as Map<String,List<Long>>
> def g = 1
> {code}
> Code above cause exception:
> {code}
> org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
> /tmp/t.groovy: 5: expecting EOF, found 'def' @ line 5, column 1.
> {code}
> If add `;` at the end of `def m = [(s): [l]] as Map<String,List<Long>>`, then all works fine.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)