waneck / testrepo

0 stars 0 forks source link

Issue 1844 - abstract toString behind type parameters. - haxe #1844

Open waneck opened 11 years ago

waneck commented 11 years ago

[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)

waneck commented 11 years ago

[comment from si...@haxe.org, published at 2013-05-23T20:06:25.000Z]