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] [Updated] (GROOVY-8735) abstract method in trait can have a body
Date Wed, 08 Aug 2018 14:55:00 GMT

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

Paul King updated GROOVY-8735:
------------------------------
    Component/s: parser-antlr4

> abstract method in trait can have a body
> ----------------------------------------
>
>                 Key: GROOVY-8735
>                 URL: https://issues.apache.org/jira/browse/GROOVY-8735
>             Project: Groovy
>          Issue Type: Improvement
>          Components: parser-antlr4
>            Reporter: Paul King
>            Assignee: Daniel Sun
>            Priority: Major
>
> The extra braces are detected in antlr2 and for abstract classes but not traits with
Parrot:
> {code}
> abstract class Foo {
>    abstract foo() // WORKS! braces prohibited here as expected
> }
> trait Bar {
>    abstract bar() {} // ERROR? braces allowed here but should not
> }
> assert Foo.methods*.name.contains('foo')
> assert Bar.methods*.name.contains('bar')
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message