On Thu, Dec 31, 2015 at 5:41 PM, Andy Dufilie <andy.dufi...@gmail.com>
wrote:

> Now that I can compile with js.swc, I am getting a lot of errors because
> the type information for many JS functions is incorrect. For example, it
> says Array's sort() is a void function. Where is the source code for js.swc
> so that I can contribute fixes?
>

>From the mailing list archives I've deduced that js.swc was generated from
the google closure extern files.  That explains why Array.prototype.sort()
and Array.prototype.reverse() were missing return values. I've submitted a
pull request to the google closure project (
https://github.com/google/closure-compiler/pull/1359/files).

Could we incorporate this fix without waiting for the closure-compiler
project to be updated?
Right now, we get this error:

    Implicit coercion of a value of type void to an unrelated type Array.
        var r:Array = [1,2].reverse();

I can see that the "externc.js.swc" build target in flex-falcon/build.xml
generates js.swc and that flex-falcon/externs/js/js-compile-config.xml
specifies which google closure extern files to use, but the
closure-compiler files (es3.js, etc) are not included in the project.  Does
the generation of js.swc involve a manual process of downloading these
files, or are they retrieved in some script?

Another example error related to these extern files is:
    Implicit coercion of a value with static type Object to a possibly
unrelated type int.
        var x:int = [1,2].pop();
...which I've created a flex-falcon pull request for (
https://github.com/apache/flex-falcon/pull/4).

There are other errors I'm getting, for which I can create pull requests or
bug reports.

Reply via email to