Details
-
Improvement
-
Status: Open
-
Major
-
Resolution: Unresolved
-
None
-
None
-
None
-
None
Description
With a method
public <T> T Stub(Closure interactions);
that is then used like
Foo foo = Stub { /* configure the foo here */ }
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. )
Attachments
Attachments
Issue Links
- is related to
-
GROOVY-7789 ClosureParams type inference compilation error when wrapping closure with object
- Closed