Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Critical
-
Resolution: Fixed
-
Affects Version/s: 1.6-beta-2
-
Fix Version/s: 1.6-rc-1, 1.5.8, 1.7-beta-1
-
Component/s: None
-
Labels:None
-
Environment:Mac OS 10.5.2
Java 1.5.0_13
Groovy 1.6-beta-2-SNAPSHOT
-
Number of attachments :
Description
It seems that in Groovy, the increment/decrement operator is not only allowed
on variables, but also on values. Here is a script that compiles without
problems:
def x = 0
println(id(x)++)
def id(x) { x }
However, at runtime I get:
Caught: java.lang.VerifyError: (class: IncTest, method: run signature:
()Ljava/lang/Object
Incompatible object argument for function call
Activity
blackdrag blackdrag
made changes -
| Field | Original Value | New Value |
|---|---|---|
| Fix Version/s | 1.6-beta-2 [ 14261 ] | |
| Fix Version/s | 1.5.7 [ 14242 ] | |
| Priority | Major [ 3 ] | Critical [ 2 ] |
Paul King
made changes -
| Description |
It seems that in Groovy, the increment/decrement operator is not only allowed on variables, but also on values. Here is a script that compiles without problems: def x = 0 println(id(x)++) def id(x) { x } However, at runtime I get: Caught: java.lang.VerifyError: (class: IncTest, method: run signature: ()Ljava/lang/Object;) Incompatible object argument for function call |
It seems that in Groovy, the increment/decrement operator is not only allowed on variables, but also on values. Here is a script that compiles without problems: {code} def x = 0 println(id(x)++) def id(x) { x } {code} However, at runtime I get: Caught: java.lang.VerifyError: (class: IncTest, method: run signature: ()Ljava/lang/Object;) Incompatible object argument for function call |
Guillaume Laforge
made changes -
| Fix Version/s | 1.5.7 [ 14242 ] | |
| Fix Version/s | 1.5.8 [ 14630 ] | |
| Fix Version/s | 1.6-beta-2 [ 14261 ] |
blackdrag blackdrag
made changes -
| Assignee | Jochen Theodorou [ blackdrag ] | |
| Status | Open [ 1 ] | Closed [ 6 ] |
| Resolution | Fixed [ 1 ] | |
| Fix Version/s | 1.7-beta-1 [ 14014 ] | |
| Fix Version/s | 1.6-rc-1 [ 14009 ] |