coerce_a Operation Coerce a value to the any type.
Format coerce_a Forms Stack ..., value => ..., value Description Indicates to the verifier that the value on the stack is of the any type (*). Does nothing to value. On Mon, Sep 30, 2013 at 6:03 PM, Gordon Smith <gosm...@adobe.com> wrote: > Can you remind me what the "a" in coerce_a means? > > - Gordon > > -----Original Message----- > From: Alex Harui [mailto:aha...@adobe.com] > Sent: Monday, September 30, 2013 2:43 PM > To: dev@flex.apache.org > Subject: [FALCON] using coerce_a > > Gordon, Darrell (mostly) > > My latest problem appears to be in assigning to a Dictionary. For the > following code: > > var dict:Dictionary = new Dictionary(); > Var i:int; > Dict["foo"] = (i == 0 ? new SomeClass() : new SomeOtherClass()); > > MXMLC generates a coerce_a after the constructProp for both SomeClass and > SomeOtherClass. > For some reason, FlashPlayer doesn't care if the coerce_a is missing, but > AIR seems to. > > The question is, should a complex assignment statement like the above know > about the destination type as the clauses of the ternary statement are > being reduced? And if so, how would we get that knowledge into the reducer. > > Alternatively, is it safe to add a coerce_a before an assignment to a > Dictionary? If so, what would be the recommended way to determine the > assignment is to a Dictionary? > > Thanks, > -Alex > >