Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
Description
Consider the following:
@groovy.transform.TypeChecked void test() { Serializable x = 0 Serializable y = 1.2 Serializable z = Math.PI System.err.println(x.class.name) System.err.println(y.class.name) System.err.println(z.class.name) } test()
The BigDecimal literal 1.2 works fine. The other two give an error. Dynamic groovy boxes and completes the assignment.