[ https://issues.apache.org/jira/browse/GROOVY-4349?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Eric Milles reassigned GROOVY-4349: ----------------------------------- Assignee: Eric Milles > Static imports and local method resolution fails when using implied property > setter > ----------------------------------------------------------------------------------- > > Key: GROOVY-4349 > URL: https://issues.apache.org/jira/browse/GROOVY-4349 > Project: Groovy > Issue Type: Sub-task > Components: Compiler > Affects Versions: 1.7.4 > Reporter: Jonathan Ozik > Assignee: Eric Milles > Priority: Major > > In the case described below, there is a bug in how static imports and local > methods are resolved when using an implied property setter (i.e., xxx.var1 = > 8). > Peter Niederwieser reduced the initial test case to the one here: > {code:title=Utility.groovy} > class Utility { > static One method1(int a) { > println "Utility.method1" > return new One() > } > static One method2(One o) { > println "Utility.method2" > return o > } > } > {code} > {code:title=Harness.groovy} > import static Utility.* > class Harness { > def method1() { > println "Harness.method1" > return new One() > } > def run() { > method2(method1()).var1 = 8 > } > static main(args) { > new Harness().run() > } > } > class One { > def var1 > } > {code} > With Groovy 1.7.3: > {noformat} > groovy Harness > > > Harness.method1 > Caught: groovy.lang.MissingMethodException: No signature of method: static > Utility.method1() is applicable for argument types: (One) values: > [One@5dc1ac46] > Possible solutions: method1(int), method2(One) > at Harness.run(Harness.groovy:10) > at Harness.main(Harness.groovy:14) > {noformat} > With Groovy Trunk: > {noformat} > Harness.method1 > Caught: groovy.lang.MissingMethodException: No signature of method: > Harness.method2() is applicable for argument types: (One) values: > [One@45cbda0a] > Possible solutions: method1() > at Harness.run(Harness.groovy:10) > at Harness.main(Harness.groovy:14) > {noformat} -- This message was sent by Atlassian Jira (v8.3.4#803005)