[Issue 21829] New: `private` is ignored when a public overload exists

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Apr 15 13:17:20 UTC 2021


https://issues.dlang.org/show_bug.cgi?id=21829

          Issue ID: 21829
           Summary: `private` is ignored when a public overload exists
           Product: D
           Version: D2
          Hardware: x86
                OS: Windows
            Status: NEW
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: nobody at puremagic.com
          Reporter: Bastiaan at Veelo.net

--- test.d
void main()
{
    import bar;
    foo(1); // Compiles, violating private.
}
--- bar.d
import std.stdio;

private void foo(int i)
{
    writeln("Private!!!");
}
void foo()
{
    writeln("Public");
}

--


More information about the Digitalmars-d-bugs mailing list