[Issue 10666] New: Regresion (2.064 git-head, 2.053+): Appender does not work with a RefCounted type
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu Jul 18 07:00:01 PDT 2013
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: nobody at puremagic.com
ReportedBy: andrej.mitrovich at gmail.com
--- Comment #0 from Andrej Mitrovic <andrej.mitrovich at gmail.com> 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:
> core.exception.AssertError at std.typecons(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: -------
More information about the Digitalmars-d-bugs
mailing list