@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.
Comment #1 by bearophile_hugs — 2010-05-20T09:24:06Z