flex-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Harbs <harbs.li...@gmail.com>
Subject [FalconJX] casting idea
Date Thu, 09 Mar 2017 17:37:50 GMT
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”).


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