[ https://issues.apache.org/jira/browse/GROOVY-10104?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Eric Milles updated GROOVY-10104: --------------------------------- Fix Version/s: 3.0.9 > SC: runtime error for default argument call expression > ------------------------------------------------------ > > Key: GROOVY-10104 > URL: https://issues.apache.org/jira/browse/GROOVY-10104 > Project: Groovy > Issue Type: Bug > Components: Static compilation > Affects Versions: 2.5.14, 3.0.8, 4.0.0-beta-1 > Reporter: Eric Milles > Assignee: Eric Milles > Priority: Major > Fix For: 4.0.0-beta-1, 3.0.9 > > > Follow up from GROOVY-6851 and GROOVY-9151. Consider the following: > {code:groovy} > @groovy.transform.CompileStatic > void greet(Object o = 'world', String s = o.toString()) { > print "hello $s" > } > /*void greet() { > Object o = 'world' > greet(o, (String)o.toString()) // IncompatibleClassChangeError: Expected > static method java.lang.Object.toString()Ljava/lang/String; > }*/ > greet() > {code} > The STCV only looks at the default argument expressions, not the generated > methods. So there still can be issues in the statically compiled result. -- This message was sent by Atlassian Jira (v8.3.4#803005)