groovy-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Paul King (JIRA)" <j...@apache.org>
Subject [jira] [Closed] (GROOVY-8161) Empty statement before semicolon with parrot parser
Date Tue, 06 Mar 2018 23:26:13 GMT

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

Paul King closed GROOVY-8161.
-----------------------------

> 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
>            Priority: Major
>             Fix For: 2.6.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
(v7.6.3#76005)

Mime
View raw message