Summary: Import within aggregate causes conflicts with private
           Product: D
           Version: 1.043
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: rejects-valid
          Severity: normal
          Priority: P3
         Component: DMD

The following two-file code doesn't compile:

  private void foo() {}

  void foo() {}

  class C {
    import b;

    void bar() { foo(); }

The resulting errors from 'dmd -c a.d':

a.d(3): Error: class a.C is private
a.d(6): Error: function is not accessible from a

If the import and/or function bar are moved to the global scope, the code is
accepted. The private identifier from module b shouldn't be visible in module
a, so no error should result.

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to