Bug 3636 – module-level @safe not propagated to struct members
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
Other
OS
Mac OS X
Creation time
2009-12-20T07:19:00Z
Last change time
2015-06-09T01:27:04Z
Keywords
rejects-valid
Assigned to
nobody
Creator
michel.fortin
Comments
Comment #0 by michel.fortin — 2009-12-20T07:19:00Z
This does not compile, but it should:
@safe {
struct A {
void hello() { }
}
void test() {
A a;
a.hello(); // Error: safe function 'test' cannot call system function 'hello'
}
}