You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "John Wagenleitner (JIRA)" <ji...@apache.org> on 2018/06/16 18:34:00 UTC
[jira] [Created] (GROOVY-8648) Compound assignment to attribute
fails with ASM error
John Wagenleitner created GROOVY-8648:
-----------------------------------------
Summary: Compound assignment to attribute fails with ASM error
Key: GROOVY-8648
URL: https://issues.apache.org/jira/browse/GROOVY-8648
Project: Groovy
Issue Type: Bug
Components: class generator
Affects Versions: 2.5.0, 2.4.14
Reporter: John Wagenleitner
The following will faile with 2.4.14 and above.
{code}
class Account {
int balance = 0
void credit(int add) {
this.@balance += add
}
}
def acct = new Account()
acct.credit(3)
assert acct.balance == 3
{code}
Fails with the following in 2.5.0
{code:java}
groovy.lang.GroovyRuntimeException: ASM reporting processing error for Account#credit with signature void credit(int)
{code}
And this starting in 2.4.14
{code:java}
java.lang.VerifyError: (class: Account, method: credit signature: (I)V) Unable to pop operand off an empty stack
{code}
Possibly related to the fixes for GROOVY-8385 and the operand stack not being marked to handle the compound assignment operators.
Issue reported on the [dev mailing list|https://mail-archives.apache.org/mod_mbox/groovy-dev/201806.mbox/%3Cef1093fea2ceab17b52fc021631b7b2b5e86ca4e.camel%40winder.org.uk%3E].
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)