D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 21651 - Unimported package doesn't error out when used as part of fully qualified type
Summary: Unimported package doesn't error out when used as part of fully qualified type
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: All All
: P1 normal
Assignee: No Owner
URL:
Keywords: pull
Depends on:
Blocks:
 
Reported: 2021-02-21 06:53 UTC by Boris Carvajal
Modified: 2021-04-03 01:03 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Boris Carvajal 2021-02-21 06:53:18 UTC
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`"
Comment 1 Dlang Bot 2021-02-22 05:46:41 UTC
@BorisCarvajal updated dlang/dmd pull request #12215 "Fix Issue 21651 - Unimported package doesn't error out when used as p…" fixing this issue:

- Fix Issue 21651 - Unimported package doesn't error out when used as part of fully qualified type

https://github.com/dlang/dmd/pull/12215
Comment 2 Dlang Bot 2021-03-08 07:26:34 UTC
dlang/dmd pull request #12215 "Fix Issue 21651 - Unimported package doesn't error out when used as p…" was merged into master:

- ddf3d07c67412846e45b4e8f30a4626ebd03e151 by Boris Carvajal:
  Fix Issue 21651 - Unimported package doesn't error out when used as part of fully qualified type

https://github.com/dlang/dmd/pull/12215
Comment 3 Dlang Bot 2021-04-03 01:03:46 UTC
dlang/dmd pull request #12350 "[dmd-cxx] More fixes for package import visibility" was merged into dmd-cxx:

- f1d34057604bd181ce0933c77b27952f211196e5 by Boris Carvajal:
  [dmd-cxx] Fix Issue 21651 - Unimported package doesn't error out when used as part of fully qualified type

https://github.com/dlang/dmd/pull/12350