Tuesday, 20 August 2013

Override Object.toString Error

Override Object.toString Error

Why does this produce an error in Flash Builder?:
package {
public class Foo {
override public function toString():String {
return "Foo";
}
}
}
Tab completion suggests that this is available for override...
Error message:
Multiple markers at this line:
-public
-1020: Method marked override must override another method.
-overridesObject.toString

No comments:

Post a Comment