Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Won't Fix
-
1.8-beta-3
-
None
-
None
Description
In Groovy 1.7.6, the following code works :
assert null == null as float
In Groovy 1.8.0-beta-3, it throws an error :
org.codehaus.groovy.runtime.typehandling.GroovyCastException: Cannot cast object 'null' with class 'null' to class 'java.lang.Number' at org.codehaus.groovy.runtime.typehandling.DefaultTypeTransformation.castToNumber(DefaultTypeTransformation.java:139) at org.codehaus.groovy.runtime.typehandling.DefaultTypeTransformation.castToNumber(DefaultTypeTransformation.java:121) at org.codehaus.groovy.runtime.typehandling.DefaultTypeTransformation.floatUnbox(DefaultTypeTransformation.java:74)