Weak multisets fail to store objects properly
Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=1777
Reported by Fredrik Noring, Roxen Internet Software noring@roxen.com
As shown below, the weak multiset stores the object only after the second try. Not after the first try which it's supposed to. (A reference to the object is always kept in the 'o' variable.)
Pike v7.2 release 86 running Hilfe v2.0 (Incremental Pike Frontend)
> multiset m = set_weak_flag((<>), 1);
Result: (< >)
> object o = (class{})();
Result: object
> m[o] = 1;
Result: 1
> m;
Result: (< >)
> m[o] = 1;
Result: 1
> m;
Result: (< /* 1 element */
object
>)
> o;
Result: object