Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 1.5.4
-
Fix Version/s: 1.5.6, 1.6-beta-1
-
Component/s: None
-
Labels:None
-
Environment:HideGroovy Version:
1.5.4 JVM: 10.0-b19
Replicated in other environments, but this is my environment.
Java version:
java version "1.6.0_05"
Java(TM) SE Runtime Environment (build 1.6.0_05-b13)
Java HotSpot(TM) Client VM (build 10.0-b19, mixed mode, sharing)
OS:
Gentoo LinuxShowGroovy Version: 1.5.4 JVM: 10.0-b19 Replicated in other environments, but this is my environment. Java version: java version "1.6.0_05" Java(TM) SE Runtime Environment (build 1.6.0_05-b13) Java HotSpot(TM) Client VM (build 10.0-b19, mixed mode, sharing) OS: Gentoo Linux
-
Testcase included:yes
-
Number of attachments :
Description
Cannot use increment operator on static variables when prefixed by class name. For instance (++counter) works fine but (++ClassName.counter) does not. This is a runtime, not compile time issue.
The exception that is reported is:
java.lang.VerifyError: (class: StaticIncrementBug, method: main signature: ([Ljava/lang/String;)V) Unable to pop operand off an empty stack.
It looks like incorrect byte code which is corrupting the stack. That's just a guess, I don't know enough about groovy internals to fix it.
add code tags