waneck / testrepo

0 stars 0 forks source link

Issue 1688 - AST problem with WeakMap assigned to Map - haxe #1688

Closed waneck closed 11 years ago

waneck commented 11 years ago

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

waneck commented 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.

waneck commented 11 years ago

[comment from si...@haxe.org, published at 2013-04-13T13:06:18.000Z] This issue was closed by revision r6450.