www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 19471] New: Duplicate error messages when trying to use an


          Issue ID: 19471
           Summary: Duplicate error messages when trying to use an
                    inaccessible package symbol
           Product: D
           Version: D2
          Hardware: x86
                OS: Windows
            Status: NEW
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: slavo5150 yahoo.com

// file c/b.d
module c.b;

public void aPublicFunction() {}

package void aPackageFunction() {}

// file a.d
module a;

public import c.b;

// file main.d
import a;

void main()

dmd main.d a.d c/b.d

main.d(7): Deprecation: c.b.aPackageFunction is not visible from module main
main.d(7): Error: function c.b.aPackageFunction is not accessible from module

The compiler emits 2 messages instead of just 1.

Dec 09 2018