Details
-
Type:
Sub-task
-
Status:
Open
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: None
-
Fix Version/s: 3.0
-
Component/s: class generator
-
Labels:None
-
Number of attachments :
Description
this code:
class A {
private foo = 1
def getFoo(){
10.times { println this.foo }
return this.foo+1
}
}
def a = new A()
println a.foo
should not end in a stack overflow
Issue Links
- is depended upon by
-
GROOVY-2503
MOP 2.0 design inflluencing issues
-
Activity
Guillaume Laforge
made changes -
| Field | Original Value | New Value |
|---|---|---|
| Fix Version/s | 1.0 [ 10244 ] | |
| Fix Version/s | 1.1 [ 10436 ] |
Guillaume Laforge
made changes -
| Fix Version/s | 1.1-beta-2 [ 10436 ] |
blackdrag blackdrag
made changes -
| Fix Version/s | 2.0 [ 13489 ] |
Andres Almiray
made changes -
| Link | This issue is related to GROOVY-1729 [ GROOVY-1729 ] |
blackdrag blackdrag
made changes -
| Priority | Critical [ 2 ] | Major [ 3 ] |
blackdrag blackdrag
made changes -
| Link | This issue is depended upon by GROOVY-2503 [ GROOVY-2503 ] |
blackdrag blackdrag
made changes -
| Link | This issue is related to GROOVY-1729 [ GROOVY-1729 ] |
Andres Almiray
made changes -
| Description |
this code: class A { private foo = 1 def getFoo(){ 10.times { println this.foo } return this.foo+1 } } def a = new A() println a.foo should not end in a stack overflow |
this code:
{code} class A { private foo = 1 def getFoo(){ 10.times { println this.foo } return this.foo+1 } } def a = new A() println a.foo {code} should not end in a stack overflow |
blackdrag blackdrag
made changes -
| Parent | GROOVY-2503 [ 61571 ] | |
| Issue Type | Bug [ 1 ] | Sub-task [ 7 ] |
the stack overflow happens, because the closures
{ println this.foo }or
{println foo}will call the getFoo method again, instead of accessing the field directly, like we usually do from any method.