[Issue 8951] New: static array of context pointer struct s fails:
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sat Nov 3 02:47:15 PDT 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8951
Summary: static array of context pointer struct s fails:
Product: D
Version: unspecified
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: monarchdodra at gmail.com
--- Comment #0 from monarchdodra at gmail.com 2012-11-03 02:47:13 PDT ---
Creating a static array of structs that have a context pointer is not
supported:
//----
import std.stdio;
void main()
{
int a;
struct S
{
~this()
{
writeln("pre ++a");
++a;
writeln("post ++a");
}
}
{
writeln(1);
S stuff;
writeln(2);
}
writeln(3);
{
writeln(4);
S[2] stuff;
writeln(5);
}
writeln(6);
}
//----
1
2
pre ++a
post ++a
3
4
5
pre ++a
object.Error: Access Violation
//----
--
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