Eric Milles created GROOVY-9700: ----------------------------------- Summary: SC: set groovy property written for variable expression assignment that should be direct setter call Key: GROOVY-9700 URL: https://issues.apache.org/jira/browse/GROOVY-9700 Project: Groovy Issue Type: Bug Reporter: Eric Milles Assignee: Eric Milles
Consider the following: {code:groovy} class A { void setX(Date value) {} void setX(Long value) {} } class B extends A { void m() { x = 42L x = new Date() } } {code} When compiled with {{@compileStatic}} the method "m" contains calls to {{ScriptBytecodeAdapter.setGroovyObjectProperty}} for the assignment statements. If "x" is replaced by "this.x" direct setter calls are written instead, as expected. -- This message was sent by Atlassian Jira (v8.3.4#803005)