D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 20537 - traits isPackage/isModule and is(package/module) fail on single level package.d import
Summary: traits isPackage/isModule and is(package/module) fail on single level package...
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: 2020-01-27 05:44 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 2020-01-27 05:44:51 UTC
Steps:

mkdir p
touch p/package.d

test.d
--------
import p;
  
static assert(is(p == package));       // <- fails
static assert(__traits(isPackage, p)); // <- fails
static assert(is(p == module));
static assert(__traits(isModule, p));
--------

dmd testp.d


It should be true in both cases.
Comment 1 Dlang Bot 2020-01-31 04:18:22 UTC
@BorisCarvajal updated dlang/dmd pull request #10745 "Fix Issue 20530 - second part. is(<...> == module/package) does not w…" fixing this issue:

- Fix Issues 20530, 20537 - resolve trait isPackage/isModule and is(package/module) quirks

https://github.com/dlang/dmd/pull/10745
Comment 2 Dlang Bot 2020-02-11 03:11:16 UTC
dlang/dmd pull request #10745 "Fix Issues 20530, 20537 - resolve trait isPackage/isModule and is(package/module) quirks" was merged into stable:

- ccd001b1235c38dbbaa2f3d630dcdc6b240d72ba by Boris Carvajal:
  Fix Issues 20530, 20537 - resolve trait isPackage/isModule and is(package/module) quirks

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

- c2130f7834256741299501c9a63a13dee92b7864 by Boris Carvajal:
  Fix Issues 20530, 20537 - resolve trait isPackage/isModule and is(package/module) quirks

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