@safe struct S {
~this(){} // need dtor to reproduce
}
@safe void main(){
S s1, s2;
s1 = s2; // error
}
Compiler message: safe function 'main' cannot call system function 'opAssign'
Comment #1 by maxim — 2013-01-01T10:20:02Z
Same problem was discussed here: http://forum.dlang.org/thread/[email protected]
The problem is that default opAssign is not deduced to be pure. It seems that dtors also cannot be marked as pure.
Comment #2 by k.hara.pg — 2014-09-18T10:50:26Z
Fixed in 2.064.
*** This issue has been marked as a duplicate of issue 10079 ***