You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@royale.apache.org by GitBox <gi...@apache.org> on 2020/04/10 16:23:56 UTC

[GitHub] [royale-compiler] aharui commented on issue #143: Wrong "this" in Function given as Param

aharui commented on issue #143: Wrong "this" in Function given as Param
URL: https://github.com/apache/royale-compiler/issues/143#issuecomment-612106386
 
 
   Apologies for arriving late to this issue.  Can someone explain the need for conditionalBind() and when it would be used?  The issue from looking over the source (I haven't debugged into it), is that expressions like `parentApplication.buttonFunction;` must be strongly typed.  Properties that are of type `Object` or `*` like `parentApplication` cause the compiler to lose track of the types of things so the code paths you want in the transpiler don't get hit.  The correct code would look more like:
   
   `(parentApplication as Example).buttonFunction;`

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services