Details
Description
(and thus resets all fields with initializers)
Following code :
class Test:
_x = "pre"
def constructor():
print _x
def constructor(x as string):
_x = x
self()
Test("post")
Shows "pre", whereas it should obviously show "post".
We should either :
1) disallow using self() at any other position than first in the block (as what C# does in practice).
2) add a $initialized$ boolean field so that $initializer$ is executed only once.
(2) sounds more boo-ish imho, we could add the field only when there is more than one constructor on the object.
fixed in rev. 2992