D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 13134 - Lexically first `private` function overload makes all overloads `private`
Summary: Lexically first `private` function overload makes all overloads `private`
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: All All
: P1 major
Assignee: No Owner
URL:
Keywords: rejects-valid
Depends on:
Blocks:
 
Reported: 2014-07-15 14:54 UTC by Denis Shelomovskii
Modified: 2020-03-21 03:56 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Denis Shelomovskii 2014-07-15 14:54:14 UTC
This code should compile:
---
module foo;

// void f(int,int) { } // uncomment to remove error
private void f(int) { }
void f() { }
---
import foo;

void main()
{
    f();
}
---
main.d(5): Error: module main function foo.f is private
---
Comment 1 RazvanN 2018-01-26 11:13:53 UTC
Cannot reproduce on git HEAD ubuntu 16.04. Closing as Fixed.