Bug 12970 – Enclosing @system attribute is precedence than postfix @safe
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2014-06-23T14:58:00Z
Last change time
2014-06-25T02:25:15Z
Keywords
pull, wrong-code
Assigned to
nobody
Creator
k.hara.pg
Comments
Comment #0 by k.hara.pg — 2014-06-23T14:58:41Z
Test case:
@system {
@safe void f1() {}
void f2() @safe {}
pragma(msg, typeof(f1)); // @safe void() - OK
pragma(msg, typeof(f2)); // @system void() - !?
}
Both f1 and f2 should be marked as @safe.