www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 21829] New: `private` is ignored when a public overload exists

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 puremagic.com
          Reporter: Bastiaan 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");
}

--
Apr 15