Details
-
Wish
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.0-JSR-5, 1.0-JSR-6
-
None
Description
use(StringCategory) {
return "hello".capitalize()
}
returns null (use is a void method). However a closure call always returns Object. In keeping with the element of least surprise, use() should return the closures return value.
Attachments
Attachments
Issue Links
- is duplicated by
-
GROOVY-1770 use(category){closure} should propagate the value returned by its closure
- Closed
- relates to
-
GROOVY-2474 Change all withXXX methods to return the value returned by their closure instead of void
- Closed