Comment #0 by verylonglogin.reg — 2013-11-05T22:56:19Z
As `dup` calls postblit it should be either @system impure or conditionally @safe pure as suggested in Issue 5700:
---
struct S
{ this(this){} }
void main() @safe pure
{
S[1] s;
s.dup; // should not be allowed
}
---
Comment #1 by k.hara.pg — 2014-05-25T21:53:26Z
The issues is fixed in git-head (2.066a), by implementing 'dup' function in druntime.
test.d(7): Error: pure function 'D main' cannot call impure function 'object.dup!(S).dup'
test.d(7): Error: safe function 'D main' cannot call system function 'object.dup!(S).dup'