Closed waneck closed 11 years ago
[comment from si...@haxe.org, published at 2013-04-12T13:32:19.000Z] I can't see how this would be easily fixed at the moment, so we should disallow the assignment for now.
[comment from si...@haxe.org, published at 2013-04-13T13:06:18.000Z] This issue was closed by revision r6450.
[Google Issue #1688 : http://code.google.com/haxe/issues/detail?id=1688] by si...@haxe.org, at 2013-04-12T12:43:09.000Z class Main { public function new() { } public static function main() { var map:Map<Main, String> = new haxe.ds.WeakMap(); map.set(new Main(), "bar"); for (i in map) { trace(i); } } }
The multitype resolution causes map to become an ObjectMap: ((((Local map:319 : haxe.ds.ObjectMap<Main, String>)[(New Main() : Main)] : String) = (Const "bar" : String)) : Unknown<0>);
This causes DCE issues, possibly among other things.