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 2019/01/09 23:29:46 UTC

[GitHub] sobotklp opened a new issue #367: Creating a toJSON method results in an error

sobotklp opened a new issue #367: Creating a toJSON method results in an error
URL: https://github.com/apache/royale-asjs/issues/367
 
 
   Whenever I create a class method called toJSON, compiling with Royale errors out with "Error: Overriding a function that is not marked for override".
   
   Consider the following code:
   `package {
           public class Main {
   
                   public function Main () {
   
                           console.log("HELLO");
                   }
   
                   public function toJSON():String {
                           return "";
                   }
           }
   }`
   
   When compiling using `asjsc -debug=true --targets=js src/Main.as`, I get the error
   `src/Main.as(9): col: 19 Error: Overriding a function that is not marked for override
   
   		public function toJSON():String {`
   
   Is that expected?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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