/customers/iconara.net/iconara.net/httpd.www/blog/wp-content/plugins/wp-super-cache/wp-cache-phase1.php Iconara » MXMLC WTF (2)


Error: Method marked override must override another method.

public override function toString( ) : String {

WTF? How can mxmlc not know that Object defines toString?

Hmmm, it seems like you don’t need “override” on methods inherited from Object… oh, how I love those exceptions to the rules.

But whoa? This happens when I remove the “override”:

Error: Call to a possibly undefined method toString through a 
reference with static type net.iconara.logging:LogPattern.

return pattern.toString();

(LogPattern is an interface, the toString method is declared in the class BasicLogPattern, which implements LogPattern)

WTF #2 is that mxmlc doesn’t understand that an interface type is also always of type Object.

mxmlc is probably the most stupid compiler since the ActionScript 2 compiler.

The solution? Why, you have to counter a stupidity with another stupidity:

return (pattern as Object).toString();

Leave a Reply