If you are talking about the goog.base() inside the constructor body, it
always has to be there unless the class inherits from Object.
This is needed to simulate ActionScript semantics: if your constructor does
not contain a super(...) statement, an implicit one is added as the first
statement. If no constructor is specified at all, a no-arg constructor
simply calling super() is implicitly added (which leads to a compiler error
if the super class does not allow no args for the constructor).
Of course, all this implicit stuff is not automatically done by JavaScript
(as it is unaware of our class system), and so has to be added to generated
code explicitly. I guess when you are visiting ABC, not AST, the implicit
code is already present, in other words, you should never find a
constructor not doing a super() call in ABC. But mind that I know nothing
of ABC, so this is just a common sense guess.

-Frank-

On Fri, Dec 7, 2012 at 9:14 PM, Erik de Bruin <e...@ixsoftware.nl> wrote:

> On the second one, I would tentatively say "no, it doesn't have to be
> there"... but a definitive answer might require some more research.
>

Reply via email to