Bug 20537 – traits isPackage/isModule and is(package/module) fail on single level package.d import
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2020-01-27T05:44:51Z
Last change time
2021-04-03T01:03:43Z
Keywords
pull
Assigned to
No Owner
Creator
Boris Carvajal
Comments
Comment #0 by boris2.9 — 2020-01-27T05:44:51Z
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 by dlang-bot — 2020-01-31T04:18:22Z
@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 by dlang-bot — 2020-02-11T03:11:16Z
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 by dlang-bot — 2021-04-03T01:03:43Z
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