You can turn off all "as" output in the cross-compile via -skipAsCoercions compiler option. Then you shouldn't need @flexjsignorecoercion. And then you use @flexjsemitcoercion where you actually need it.
Introducing new keywords makes me nervous, but I am not opposed to it. Nor do I want to be the person who implements it. My 2 cents, -Alex On 3/9/17, 9:37 AM, "Harbs" <harbs.li...@gmail.com> wrote: >It’s really a drag to constantly put in @flexjsignorecoercion every time >I’m using “as” to make the compiler happy. 99% of the time I’m not >interested in Language.as being added to the code. > >Here’s a thought: Can we add a new operator for non-essential casts? > >Something like this: > >var foo:Thing = item as Thing would cross-compiler to var foo = >Language.as(item,Thing) > >but var foo:Thing = item asa Thing would just compile as “var foo = >thing;” (and on the SWF side, “asa” would become a regular “as”). > >Thoughts? > >Harbs