https://issues.dlang.org/show_bug.cgi?id=12622
Issue ID: 12622
Summary: Purity, @safe not checked for pointers to functions
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: major
Priority: P1
Component: DMD
Assignee: [email protected]
Reporter: [email protected]
Given:
void bar16();
@safe void foo16() {
auto fp = &bar16;
(*fp)(); // should give error
bar16(); // correctly gives error
}
Replacing @safe with purity or @nogc, and no error is given. It does work for
nothrow.
--
