http://d.puremagic.com/issues/show_bug.cgi?id=4211

           Summary: struct with annotation(@safe)
           Product: D
           Version: 2.041
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nob...@puremagic.com
        ReportedBy: zan77...@nifty.com


--- Comment #0 from SHOO <zan77...@nifty.com> 2010-05-20 05:47:44 PDT ---
@safe struct X
{
    void func() {  }
}

@safe class Y
{
    void func() {  }
}

@safe void main()
{
    X x;
    x.func(); // NG
    auto y = new Y;
    y.func(); // OK
}

Is this a bug?

I like the behavior of class.
I think that struct/union should change the behavior.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------

Reply via email to