You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
class Base {
public function new() { }
public function covariant():Base {
return this;
}
}
class Child extends Base {
public override function covariant():Child {
return this;
}
}
class Main {
static function main() {
var c = new Child();
var v = c.covariant();
}
}
Generated As3:
package {
public class Main {
static public function main() : void {
var c : Child = new Child();
var v : Child = c.covariant();
}
}
}
Fails in mxmlc with:
Main.as(6): col: 22 Error: Implicit coercion of a value with static type Base to a possibly unrelated type Child.
var v : Child = c.covariant();
The text was updated successfully, but these errors were encountered:
Generated As3:
Fails in mxmlc with:
The text was updated successfully, but these errors were encountered: