There is no "int" type in JavaScript, so I think the compiler should just replace int with Number.
In general I would not recommend using "as Number" or "as int" anyway, since it returns null if the value is of a different type, and null cast to Number or int becomes zero rather than NaN. On Mon, May 16, 2016 at 4:03 AM, Harbs <harbs.li...@gmail.com> wrote: > The new sortOn code is causing a compile error in Language.as: > Language.js:408: WARNING - variable int is undeclared > [java] opt2 = org.apache.flex.utils.Language.as(opt, int); > > I can easily fix this by changing opt2 = opt as int; to opt2 = int(opt); > but I think this is a bug in the “as” implementation. I’m not sure where > the core types are defined to fix this. > > Harbs