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: nob...@puremagic.com
        ReportedBy: monarchdo...@gmail.com


--- Comment #0 from monarchdo...@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: -------

Reply via email to