You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Paul King (JIRA)" <ji...@apache.org> on 2018/12/16 05:37:00 UTC

[jira] [Closed] (GROOVY-3360) Better error message for assert a = 1

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

Paul King closed GROOVY-3360.
-----------------------------
       Resolution: Fixed
         Assignee: Daniel Sun
    Fix Version/s:     (was: 4.x)
                   3.0.0-alpha-4

The Parrot parser already gives:
Assignment expression is not allowed in the assert statement

> 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-antlr2
>            Reporter: Guillaume Delcroix
>            Assignee: Daniel Sun
>            Priority: Major
>              Labels: contrib
>             Fix For: 3.0.0-alpha-4
>
>
> 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
(v7.6.3#76005)