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 2020/02/21 03:47:00 UTC
[jira] [Resolved] (GROOVY-9414) Groovy 3.0.1 : @Delegate does not
work with default getter
[ https://issues.apache.org/jira/browse/GROOVY-9414?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Paul King resolved GROOVY-9414.
-------------------------------
Fix Version/s: 3.0.2
Assignee: Paul King
Resolution: Fixed
Should work now.
> Groovy 3.0.1 : @Delegate does not work with default getter
> ----------------------------------------------------------
>
> Key: GROOVY-9414
> URL: https://issues.apache.org/jira/browse/GROOVY-9414
> Project: Groovy
> Issue Type: Bug
> Components: Compiler
> Affects Versions: 3.0.1
> Environment: macOS Catalina
> Version: 10.15.3
> Reporter: Puneet Behl
> Assignee: Paul King
> Priority: Major
> Fix For: 3.0.2
>
>
> It looks like the default getter for a property is not picked up by the @{{Delegate}}. For example the below code:
> {code:groovy}
> interface Foo {
> String getName()
> }
> class Bar {
> String name
> }
> class FooImpl implements Foo {
> @Delegate(includes = "getName") Bar bar
> }
> {code}
> throws a compile-time error as:
> {code:java}
> 1 compilation error:
> Error during @Delegate processing: 'includes' property or method 'getName' does not exist.
> at line: 10, column: 5
> {code}
> *Please note* that I have also tested with the latest 3.0.2-SNAPSHOT.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)