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

Eric Milles commented on GROOVY-10433:
--------------------------------------

Is there any hope for "non-sealed"?  That is a valid binary expression under 
Groovy 3 (either parser).

I am not able to define variables named "as", "in" or "trait".  But the others 
like "var" and "yield" do work, except for "def var; var = null" (GROOVY-9630). 
 Should it be a separate bug to allow "as", "in" and "trait" as variable names?

> "sealed" not usable as a restricted identifier
> ----------------------------------------------
>
>                 Key: GROOVY-10433
>                 URL: https://issues.apache.org/jira/browse/GROOVY-10433
>             Project: Groovy
>          Issue Type: Bug
>          Components: parser-antlr4
>    Affects Versions: 4.0.0-rc-2
>            Reporter: Eric Milles
>            Priority: Major
>
> The restricted identifier "sealed" is not usable for a variable or member 
> name any longer.
> {code:groovy}
> def sealed = false // fails to parse
> def record = false // okay
> def permits = false // okay
> class C {
>   def sealed = false // fails to parse
>   def record = false // okay
>   def permits = false // okay
> }
> {code}
> And this should still work as minus: "\{ non, sealed -> return non-sealed \}"



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to