Description
When a class declares a double property and setter for it:
class DoubleWithSetter { protected double myDouble void setMyDouble(double val) { this.myDouble = val } }
A statically-compiled subclass cannot "assign" a BigDecimal literal to that property:
import groovy.transform.CompileStatic @CompileStatic class BigDecimalImplicitDoubleSetter extends DoubleWithSetter { void doStuff() { double doubleVar = 0.0 // works myDouble = doubleVar // works myDouble = 0.0 // [Static type checking] - Cannot assign value of type java.math.BigDecimal to variable of type double } }