Details
Description
From Groovy >2.4 simple calculations cannot be @TypeChecked without loads of casting:
import groovy.transform.TypeChecked
@TypeChecked
def test() {
Math.sqrt(Math.PI*2)
}
=> [Static type checking] - Cannot find matching method java.lang.Math#sqrt(java.math.BigDecimal). Please check if the declared type is correct and if the method exists.
in Groovy 2.4 this was valid code.
I was able to write a TypeChecker, but it looks pretty ugly and i am not shure, that this does not add other complications.
Since most of my colleagues are not groovy mains, i prefer forcing the TypeChecker, but this would lead to permanent castings from BigDecimal to double before calling any method.
Any better workaround or a fix is appreciated.
Attachments
Attachments
Issue Links
- links to