[ https://issues.apache.org/jira/browse/GROOVY-10433?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17466572#comment-17466572 ]
Eric Milles commented on GROOVY-10433: -------------------------------------- I wouldn't expect "def private = ..." to work. It has been a keyword / reserved word from the very start of Java (and Groovy). I think only "var", "record", "sealed", "permits" and soon "_" are so-called restricted identifiers. They can be used as identifiers but serve as keywords in specific circumstances. > "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)