Bug 8952 – nested structs with conext pointers fail
Status
RESOLVED
Resolution
DUPLICATE
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2012-11-03T03:00:00Z
Last change time
2015-06-09T05:15:01Z
Assigned to
nobody
Creator
monarchdodra
Comments
Comment #0 by monarchdodra — 2012-11-03T03:00:20Z
Nesting a struct with a context pointer into another will fail.
//----
import std.stdio;
void main()
{
int a;
struct S
{
void doit()
{
writeln("pre ++a");
++a;
writeln("post ++a");
}
}
static struct SS
{
S s;
}
SS ss;
ss.s.doit();
}
//----
pre ++a
object.Error: Access Violation
//----
Comment #1 by maxim — 2012-11-03T06:44:51Z
And this one is even more closer to issue 8923
Comment #2 by verylonglogin.reg — 2012-11-08T07:33:29Z
*** This issue has been marked as a duplicate of issue 8923 ***