[Issue 13134] New: Lexically first `private` function overload makes all overloads `private`

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Tue Jul 15 07:54:14 PDT 2014


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

          Issue ID: 13134
           Summary: Lexically first `private` function overload makes all
                    overloads `private`
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Keywords: rejects-valid
          Severity: major
          Priority: P1
         Component: DMD
          Assignee: nobody at puremagic.com
          Reporter: verylonglogin.reg at gmail.com

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
---

--


More information about the Digitalmars-d-bugs mailing list