Bug 4316 – this(this) cannot become safe function.
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2010-06-14T23:39:00Z
Last change time
2011-12-20T23:22:48Z
Keywords
patch, rejects-valid
Assigned to
nobody
Creator
zan77137
Comments
Comment #0 by zan77137 — 2010-06-14T23:39:56Z
This code doesn't work!
-------------------------------
struct A
{
@safe this(this) { }
}
@safe void main()
{
A a;
auto b = a; // Error: safe function 'main' cannot call system function '__cpctor'
}