https://issues.dlang.org/show_bug.cgi?id=12970
Issue ID: 12970
Summary: Enclosing @system attribute is precedence than postfix
@safe
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Keywords: wrong-code
Severity: normal
Priority: P1
Component: DMD
Assignee: [email protected]
Reporter: [email protected]
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.
--