http://d.puremagic.com/issues/show_bug.cgi?id=10666
Summary: Regresion (2.064 git-head, 2.053+): Appender does not
work with a RefCounted type
Product: D
Version: unspecified
Platform: All
OS/Version: All
Status: NEW
Severity: regression
Priority: P2
Component: Phobos
AssignedTo: [email protected]
ReportedBy: [email protected]
--- Comment #0 from Andrej Mitrovic <[email protected]> 2013-07-18
06:59:59 PDT ---
-----
import std.array;
import std.typecons;
struct T { }
struct S
{
RefCounted!T data;
}
void main()
{
Appender!(S[]) arr;
arr.put(S());
}
-----
2.064:
$ dmd test.d
> C:\dmd-git\dmd2\windows\bin\..\..\src\phobos\std\array.d(2287): Error:
> variable std.array.Appender!(S[]).Appender.put!(S).put.item has scoped
> destruction, cannot build closure
However there is another bug in earlier releases:
2.063:
$ dmd test.d
$ test.exe
On win32 this crashes with a dialog box:
-----
[Window Title]
test.exe
[Main Instruction]
test.exe has stopped working
[Content]
A problem caused the program to stop working correctly. Please close the
program.
[Close the program] [Debug the program]
-----
I've traced down the first version that crashes:
2.053:
> Crash
Earlier releases simply have an assertion failure:
2.052:
> [email protected](2351): Assertion failure
The code which failed there is:
-----
assert(RefCounted._store._count > 0);
-----
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------