Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 1.0-beta-4
-
Fix Version/s: None
-
Component/s: class generator
-
Labels:None
Description
def func() { "hello" }
is not equivalent to
def func() { block: { "hello" } )
the former returns "hello", the latter "null".
The two are logically equivalent in every other respect, and probably should be equivalent in this respect, too.
It would also be nice if this worked as expected:
def func( test )
{
if( test )
else
{ "goodbye" }}
Being a ruby-ite, I expect this to return "hello" or "goodbye", not null.
Issue Links
- is depended upon by
-
GROOVY-753
complete parser
-
I think this issue has long been solved.