aharui commented on issue #126: Bad implicit casting to Function
URL: https://github.com/apache/royale-compiler/issues/126#issuecomment-605404732
 
 
   Here's a test case (I tested it by adding it to TestRoyaleExpressions.java). 
 I don't have time to fix it right now, I just had some time to try to 
reproduce it and got lucky.  The key seems to be that the setter for `b` has to 
be before the getter!
   
   ```    
       @Test
       public void testFunctionProperty()
       {
           IFunctionNode node = (IFunctionNode) getNode(
                   "public class B { public function a():void { b(c); } public 
function set b(v:Function):void {}  public function get b():Function { return 
null; } public function get c():Object { return null; } public function set 
c(v:Object):void {} }",
                   IFunctionNode.class, WRAP_LEVEL_PACKAGE);
           asBlockWalker.visitFunction(node);
           assertOut("/**\n * @export\n */\nB.prototype.a = function() {\n  
this.b(this.c);\n}");
       }
   ```
   

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to