Bug 16138 – Attributes of private functions should be inferred

Status
RESOLVED
Resolution
DUPLICATE
Severity
enhancement
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2016-06-08T06:01:00Z
Last change time
2017-07-01T11:43:48Z
Assigned to
nobody
Creator
bugzilla
See also
https://issues.dlang.org/show_bug.cgi?id=13567

Comments

Comment #0 by bugzilla — 2016-06-08T06:01:57Z
The following should work: ---------------------- private void bar() { } @safe void foo() { bar(); } ---------------------- dmd test test.d(6): Error: safe function 'test5.foo' cannot call system function 'test.bar' ----------------------- because attributes for private functions with bodies can be safely inferred, as they don't have external linkage issues.
Comment #1 by petar.p.kirov — 2017-07-01T11:43:48Z
*** This issue has been marked as a duplicate of issue 13567 ***