[antlr-interest] Remote Debugging with C#

Johannes Luber jaluber at gmx.de
Tue Jul 3 15:14:47 PDT 2007


Johannes Luber wrote:
> True. In the strict sense any instance variable is available over
> *this*, even if it merely a base class. I suppose the reason is
> consistency. A new programmer may be confused may be confused if one
> instance variable can be assigned this way, but not another one. I've
> tested *base* instead, but *base* may be only used inside of a method,
> property, or constructor. What a pity...
>

I have to retract that above. In the holy bible Ecma 334 is written:

"When an instance constructor has no constructor initializer, or it has
a constructor initializer of the form base(…), that constructor
implicitly performs the initializations specified by the
variable-initializers of the instance fields declared in its class. This
corresponds to a sequence of assignments that are executed immediately
upon entry to the constructor and before the implicit invocation of the
direct base class constructor. The variable initializers are executed in
the textual order in which they appear in the class
declaration (§17.4.5)."

If I interpret this correctly, instance field initializers are called
before the base class is constructed. Meaning that base access won't be
ever added.

Best regards,
Johannes Luber




More information about the antlr-interest mailing list