You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Eric Milles (Jira)" <ji...@apache.org> on 2020/08/22 02:27:00 UTC
[jira] [Created] (GROOVY-9700) SC: set groovy property written for
variable expression assignment that should be direct setter call
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)