[Google Issue #1844 : http://code.google.com/haxe/issues/detail?id=1844]
by lucadelt...@googlemail.com, at 2013-05-23T19:52:58.000Z
abstract A(Int) {
inline public function new() this=0;
inline public function toString() {
return "A";
}}
abstract M<T>(T) {
inline public function new(x:T) this=x;
inline public function toString() {
return 'M($this)';
}}
class Main {
static function main() {
var a = new A();
var m = new M(a);
trace(a);
trace(m);
}}
[Google Issue #1844 : http://code.google.com/haxe/issues/detail?id=1844] by lucadelt...@googlemail.com, at 2013-05-23T19:52:58.000Z abstract A(Int) { inline public function new() this=0; inline public function toString() { return "A"; } }
abstract M<T>(T) { inline public function new(x:T) this=x; inline public function toString() { return 'M($this)'; } }
class Main { static function main() { var a = new A(); var m = new M(a); trace(a); trace(m); } }
prints:
A M(0)
had hoped for:
A M(A)