[ https://issues.apache.org/jira/browse/GROOVY-10744?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Eric Milles resolved GROOVY-10744. ---------------------------------- Resolution: Fixed https://github.com/apache/groovy/commit/20eac13c23c5e0c202c0de48b62b9ab070ca4041 > STC support assignment of primitives to interface types like Comparable and > Serializable > ---------------------------------------------------------------------------------------- > > Key: GROOVY-10744 > URL: https://issues.apache.org/jira/browse/GROOVY-10744 > Project: Groovy > Issue Type: Bug > Components: Static Type Checker > Reporter: Eric Milles > Assignee: Eric Milles > Priority: Major > > Consider the following: > {code:groovy} > @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() > {code} > The {{BigDecimal}} literal 1.2 works fine. The other two give an error. > Dynamic groovy boxes and completes the assignment. -- This message was sent by Atlassian Jira (v8.20.10#820010)