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/11/25 03:49:27 UTC

[GitHub] [royale-asjs] estanglerbm opened a new issue #953: VerifyError: Error #1053 in Flash Debugger because Royale compiler allows incompatible function signatures

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



[GitHub] [royale-asjs] joshtynjala commented on issue #953: VerifyError: Error #1053 in Flash Debug Player because Royale compiler allows incompatible function signatures

Posted by GitBox <gi...@apache.org>.
joshtynjala commented on issue #953:
URL: https://github.com/apache/royale-asjs/issues/953#issuecomment-827780214


   I can reproduce the VerifyError. That's not good.
   
   Using the `-allow-subclass-overrides=false` compiler option when compiling your app may help here.
   
   Unfortunately, making `-allow-subclass-overrides=true` the default seems to have been intentional, and the Royale framework now takes advantage of it widely. It may be very difficult or impossible to fully unravel at this point.


-- 
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