Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 1.0-JSR-2
-
Fix Version/s: 1.0-JSR-5
-
Component/s: None
-
Labels:None
-
Environment:WinXp
-
Number of attachments :
Description
When I assign a value to a property of the superclass in a subclass the assignment has no affect:
class Class1 {
@Property prop
}
class Class2 extends Class1 {
void method()
public static void main(String[] args)
{ def class2 = new Class2() class2.method() println(class2.prop) }}
Issue Links
- is depended upon by
-
GROOVY-754
scoping
-
class Class1 {
@Property prop
}
class Class2 extends Class1 {
{ prop = prop // This is a workaround to access the property of super classe prop = "hallo" }void method()
{ def class2 = new Class2() class2.method() println(class2.prop) }public static void main(String[] args)
}