Details
-
Improvement
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
None
-
None
Description
Implicit boolean conversion is currently handled by invokedynamic cast (see CastSelector) unless the source type is primitive, Boolean or an effectively final class. The case for null can be handled without the need for a call site / method handle. Also, the not expression can be optimized somewhat as well.
Attachments
Issue Links
- is related to
-
GROOVY-10535 IF condition on empty Collection has different behavior than null Collection
- Closed
-
GROOVY-10596 IF-condition evaluation on the non-null object sometimes doesn't return true
- Closed
-
GROOVY-10617 Return statement insertion generates unnecessary dynamic cast
- Closed