estanglerbm opened a new issue #953:
URL: https://github.com/apache/royale-asjs/issues/953


   flashplayer_32_sa_debug.exe throws this error:
   
   `VerifyError: Error #1053: Illegal override of A in a.A.`
   
   With this:
   
   ```
   public interface B
   {
        function foo(c:Object):void;
   }
   
   public class A implements B
   {
        public function foo(c:String):void {}
   }
   ```
   
   Royale mxmlc happily compiles this.  Flex mxmlc will give this compile error:
   
   `Error: Interface method foo in namespace a:B is implemented with an 
incompatible signature in class a:A.`
   
   Why is this important?
   
   If you have:
   
   ```
   import org.apache.royale.events.Event;
   
   class ... implements IEventDispatcher
   {
   ...
        public function dispatchEvent( event : Event ) : Boolean { ... }
   }
   ```
   
   Royale mxmlc compiles it just fine.  And it runs fine in JS.  But in Flash 
Debugger, it throws VerifyError: Error #1053.
   
   The correct definition is:
   
   ```
   COMPILE::SWF
   {
       import flash.events.Event;
   }
   
   class ... implements IEventDispatcher
   {
   ...
        COMPILE::SWF
        public function dispatchEvent( event : flash.events.Event ) : Boolean { 
... }
   
        COMPILE::JS
        public function dispatchEvent( event : Object ) : Boolean { ... }
   }
   ```
   
   And this kind of problem is hard to track down.
   


----------------------------------------------------------------
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:
us...@infra.apache.org


Reply via email to