This fixes an error when a toString() raises an error, this can be reproduced with the following sample:
class Foo {
var o : Map<String, Foo> = [];
public function new() {
o.set("x", this);
}
public function toString() {
return "Foo:"+o; // will stack overflow
}
}
class Main {
static function main() {
cast(new Foo(), Main); // should raise cast error
}
}
Should be tested and fixed on other platforms as well.
This fixes an error when a toString() raises an error, this can be reproduced with the following sample:
Should be tested and fixed on other platforms as well.