www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 21651] New: Unimported package doesn't error out when used as

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

          Issue ID: 21651
           Summary: Unimported package doesn't error out when used as part
                    of fully qualified type
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: boris2.9 gmail.com

code:

--- pkg/a.d
module pkg.a;

pkg.b.Y a;         // Doesn't raise an error.
// int b = pkg.b.Y; // However, it does here.

--- pkg/b.d
module pkg.b;

alias Y = int;


Command: dmd pkg/a.d pkg/b.d

Should print "Error: undefined identifier `b` in package `pkg`"

--
Feb 20