Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 1.8.2
-
Fix Version/s: 1.8.3, 1.9-beta-4
-
Component/s: parser
-
Labels:None
-
Environment:Linux
-
Testcase included:yes
-
Number of attachments :
Description
I get incorrect result running the following script with groovy 1.8.2:
a=[3:5]
class B {
int v;
}
B b = new B();
b.v = 3
clos = {
if (it!=null)
{
a[it.v] += 3
}
}
clos.call(b)
println 'b.v = ' + b.v
println 'a = ' + a
> groovy test.groovy
b.v = 8
a = 8
Activity
blackdrag blackdrag
made changes -
| Field | Original Value | New Value |
|---|---|---|
| Description |
I get incorrect result running the following script with groovy 1.8.2:
a=[3:5] class B { int v; } B b = new B(); b.v = 3 clos = { if (it!=null) { a[it.v] += 3 } } clos.call(b) println 'b.v = ' + b.v println 'a = ' + a > groovy test.groovy b.v = 8 a = 8 |
I get incorrect result running the following script with groovy 1.8.2:{code:Java}
a=[3:5] class B { int v; } B b = new B(); b.v = 3 clos = { if (it!=null) { a[it.v] += 3 } } clos.call(b) println 'b.v = ' + b.v println 'a = ' + a {code} > groovy test.groovy b.v = 8 a = 8 |
blackdrag blackdrag
made changes -
| Status | Open [ 1 ] | Closed [ 6 ] |
| Fix Version/s | 1.8.3 [ 17657 ] | |
| Fix Version/s | 1.9-beta-4 [ 17656 ] | |
| Resolution | Fixed [ 1 ] |