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] [Commented] (GROOVY-3360) Better error message for assert a = 1
Date Thu, 02 Jun 2016 05:08:59 GMT

    [ https://issues.apache.org/jira/browse/GROOVY-3360?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15311746#comment-15311746
] 

Paul King commented on GROOVY-3360:
-----------------------------------

Just to add more about the if-then-else case suggested by Andre:
{code}
if (a = 1) ...
{code}
gives the following compilation error
{noformat}
expecting ')', found '=' at ...
{noformat}

> Better error message for assert a = 1
> -------------------------------------
>
>                 Key: GROOVY-3360
>                 URL: https://issues.apache.org/jira/browse/GROOVY-3360
>             Project: Groovy
>          Issue Type: Improvement
>          Components: parser-antlr
>            Reporter: Guillaume Delcroix
>              Labels: contrib
>             Fix For: 4.0
>
>
> The error message for this:
> {code}
> assert a = 1
> {code}
> could be a bit nicer instead of:
> {code}
> unexpected token '='
> {code}
> it could say that it's a comparison operator that is expected there or more generally
a boolean expression.



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

Mime
View raw message