Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.0-JSR-4
-
None
-
None
Description
def boolean b(() {}
if (!b()) prinln "OK"
this generates an NPE. We should treat null as false in this context
The source of this appears to be in the implementation of "as"
null as boolean and null as Boolean return null I think that they should return false.
This is a rather subtle point - i will post a message on dev so that we can discuss this before I try to fix it.