JavaScript allows the use of reserved words as members of
classes/interfaces, but AS3 does not.

In JS and AS3, this is not valid:

var var = 5;

However, in JS, this is valid:

var obj = {};
obj.var = 5;

Not in AS3, though.

Similarly, these are not valid AS3, but some JS types have methods with
these exact names, so that needs to change:

class Test
{
    public function delete():void {}
    public function continue():void {}
}

As far as I can tell, this JS behavior became valid in ES5. I assume after
ES4 was cancelled. There are even some APIs in the JS standard library take
advantage of this behavior already, and I'm sure that many JS libraries do
too.

Right now, to successfully build a standard library with externc (or my
dts2as tool), these APIs need to be completely excluded. It's fine for a
temporary workaround, but it will become an issue eventually.

Alex, since you've been talking about compiler changes, I thought I'd throw
this one into the ring too.

(I'm not yet familiar with this part of the compiler, but if I knew where
to look, I might be able to figure it out.)

- Josh

Reply via email to