[Issue 16138] New: Attributes of private functions should be inferred
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Tue Jun 7 23:01:57 PDT 2016
https://issues.dlang.org/show_bug.cgi?id=16138
Issue ID: 16138
Summary: Attributes of private functions should be inferred
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: enhancement
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: bugzilla at digitalmars.com
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.
--
More information about the Digitalmars-d-bugs
mailing list