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/05/05 17:03:04 UTC

[jira] [Resolved] (GROOVY-8161) Empty statement before semicolon with parrot parser

     [ https://issues.apache.org/jira/browse/GROOVY-8161?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Daniel Sun resolved GROOVY-8161.
--------------------------------
       Resolution: Fixed
    Fix Version/s: 3.0.0-alpha-1

https://github.com/apache/groovy/commit/1a1dbd801a09ea56a4d2a80a148fbee8a753d862

> Empty statement before semicolon with parrot parser
> ---------------------------------------------------
>
>                 Key: GROOVY-8161
>                 URL: https://issues.apache.org/jira/browse/GROOVY-8161
>             Project: Groovy
>          Issue Type: Bug
>          Components: parser
>    Affects Versions: 3.0.0-alpha-1
>            Reporter: Paul King
>            Assignee: Daniel Sun
>             Fix For: 3.0.0-alpha-1
>
>
> The folowing snippet:
> {code}
> for (foo in []) {;
> }
> {code}
> while a little unusual with the semicolon separating two empty statements (or terminating an empty statement if you look at things that way) should be valid but instead gives:
> {noformat}
> BUG! exception in phase 'conversion' in source unit 'ConsoleScript12' java.lang.NullPointerException
> ...
> Caused by: java.lang.RuntimeException: java.lang.NullPointerException
> 	at groovy.grape.GrabAnnotationTransformation.visit(GrabAnnotationTransformation.java:227)
> ...
> Caused by: java.lang.NullPointerException
> 	at org.codehaus.groovy.ast.CodeVisitorSupport.visitBlockStatement(CodeVisitorSupport.java:37)
> 	at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitBlockStatement(ClassCodeVisitorSupport.java:106)
> ...
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)