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

Eric Milles reassigned GROOVY-11168:
------------------------------------

    Assignee: Eric Milles

> Ability to `@DelegatesTo` the return type
> -----------------------------------------
>
>                 Key: GROOVY-11168
>                 URL: https://issues.apache.org/jira/browse/GROOVY-11168
>             Project: Groovy
>          Issue Type: Improvement
>            Reporter: Björn Kautler
>            Assignee: Eric Milles
>            Priority: Major
>
> With a method
> {code:java}
> public <T> T Stub(Closure interactions); {code}
> that is then used like
> {code:java}
> Foo foo = Stub { /* configure the foo here */ } {code}
> I'd like to be able to specify that the delegate is of type {{T}} so in the 
> given example of type {{{}Foo{}}}.
> Currently we do this in Spock via IDE-specific gdsl/dsld Scripts.
> But it would be nice if this would be supported out of the box.
> (Ideally in 2.5 already, as we still have a 2.5 compatible artifact. :))



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to