[Issue 4211] New: struct with annotation(@safe)
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu May 20 05:47:48 PDT 2010
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: nobody at puremagic.com
ReportedBy: zan77137 at nifty.com
--- Comment #0 from SHOO <zan77137 at 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: -------
More information about the Digitalmars-d-bugs
mailing list