Details
-
Improvement
-
Status: Closed
-
Minor
-
Resolution: Won't Fix
-
None
-
None
-
None
-
None
-
all
Description
Currently it seems that the "return" keyword is only optional for the last statement before the closing brace of a method. It would be nice if it were optional everywhere so that the value of the last expression evaluated is returned. For example,
myMethod() {
try
catch (SomeException e)
{ return calculateSomethingElse() }}
Currently those return keywords are required.
Attachments
Issue Links
- is depended upon by
-
GROOVY-762 implement syntax improvements
- Closed