Details
-
Type:
Sub-task
-
Status:
Open
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: 1.5.6
-
Fix Version/s: None
-
Component/s: class generator
-
Labels:None
-
Environment:Windows XP
-
Number of attachments :
Description
Why does something like that work?
class Base {
String test() {
return subClassField // subClassField is unknown in class Base!!
}
}
class Sub extends Base {
private subClassField = "foo"
static main(args) {
println new Sub().test() // -> "foo"
}
}
Hm, the formatting of the code got lost somewhat, but I guess you can figure out how it was meant to be