incubator-flex-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Frank Wienberg <fr...@jangaroo.net>
Subject Re: [ASJS] Adjusting FalconJS output (no general discussion in this thread, please)
Date Sat, 08 Dec 2012 00:04:31 GMT
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 <erik@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.
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message