[Issue 14595] [REG2.066] RefCounted data corrupted when in an AA
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Sat May 16 20:38:41 PDT 2015
https://issues.dlang.org/show_bug.cgi?id=14595
--- Comment #2 from Vladimir Panteleev <thecybershadow at gmail.com> ---
Alternative reduction:
//////// test.d ////////
struct S
{
int* count;
this(int)
{
count = new int;
*count = 1;
}
this(this)
{
++count;
}
~this()
{
--*count;
}
}
S[string] aa;
void main()
{
aa[null] = S(42);
auto p = null in aa;
assert(*p.count);
}
////////////////////////
2.064.2: works
2.065.0: ICE
2.066.1: assert fails
--
More information about the Digitalmars-d-bugs
mailing list