Details
Description
The ClassCastException is thrown only in combination of a -= (or +=) operator and a closure.
void doesNotWork() { float myFloat = 40f myFloat -= 20f println "doesNotWork() $myFloat" // the exception is thrown here, but because of the combination of the -= and the closure (0..1).each { i -> // this can be any closure - doesn't matter println "doesNotWork() in the closure: $myFloat" } }
Did not occure with 1.8.3.