[
https://issues.apache.org/jira/browse/GROOVY-8036?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15804067#comment-15804067
]
Tommy Svensson commented on GROOVY-8036:
----------------------------------------
Hmm, maybe it is in combination with the full class that something goes wrong.
I isolated the problem to this construct by commenting out different parts of
the code until it compiled. In the end only commenting out this construct made
the file compile OK.
When I'm done and have my code checked in on github and if I still can
reproduce this then I'll supply a link to my repo and point out which class it
is.
> Compiler throws NPE
> -------------------
>
> Key: GROOVY-8036
> URL: https://issues.apache.org/jira/browse/GROOVY-8036
> Project: Groovy
> Issue Type: Bug
> Components: Compiler
> Affects Versions: 2.4.7
> Reporter: Tommy Svensson
>
> With code like this:
> int a = 5
> [1..a].each { ->
> println "qwerty"
> }
> the compiler throws an NPE. OK, this is incorrect code since it is missing a
> value before '->', but this should preferably produce an error message and
> not an NPE :-)
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)