Bug 10501 – Can't put the safety attribute at the end of module constructor signature

Status
RESOLVED
Resolution
DUPLICATE
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-06-29T09:22:00Z
Last change time
2015-06-09T05:14:43Z
Assigned to
nobody
Creator
tommitissari

Comments

Comment #0 by tommitissari — 2013-06-29T09:22:18Z
The safety attributes: @safe, @trusted and @system can be put only before the static constructor signature, not at the end of it. This is not consistent with their behaviour in other function signatures: class C { this() @safe { } // OK void foo() @safe { } // OK } @safe static this() { } // OK static this() @safe { } // Error shared static this() @safe { } // Error
Comment #1 by yebblies — 2013-11-20T23:03:27Z
*** This issue has been marked as a duplicate of issue 6677 ***