D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 20530 - is(<...> == module/package) does not work with string mixins
Summary: is(<...> == module/package) does not work with string mixins
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-23 20:06 UTC by moonlightsentinel
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 moonlightsentinel 2020-01-23 20:06:50 UTC
Checking if something is a module/package does not work if the identifier is supplied using a string mixin:

module test;

static assert(is(test == module));
static assert(is(mixin("test") == module)); // fails

import somePackage;

static assert(is(somePackage == package));
static assert(is(mixin("somePackage") == package)); // fails
Comment 1 Dlang Bot 2020-01-24 04:00:19 UTC
@BorisCarvajal created dlang/dmd pull request #10739 "Fix Issue 20530 - is(<...> == module/package) does not work with stri…" fixing this issue:

- Fix Issue 20530 - is(<...> == module/package) does not work with string mixins

https://github.com/dlang/dmd/pull/10739
Comment 2 Dlang Bot 2020-01-24 05:04:55 UTC
dlang/dmd pull request #10739 "Fix Issue 20530 - is(<...> == module/package) does not work with stri…" was merged into stable:

- ae627fe87f3ca2b2ac52bc7a9d73503788e448c5 by Boris Carvajal:
  Fix Issue 20530 - is(<...> == module/package) does not work with string mixins

https://github.com/dlang/dmd/pull/10739
Comment 3 Dlang Bot 2020-02-11 03:11:15 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 4 Dlang Bot 2021-04-02 05:45:27 UTC
dlang/dmd pull request #12339 "[dmd-cxx] Backport fixes and trivial features from upstream dmd" was merged into dmd-cxx:

- eca6f8130c257ce8d4f083443504bf46e0e6e584 by Boris Carvajal:
  [dmd-cxx] Fix Issue 20530 - is(<...> == module/package) does not work with string mixins

https://github.com/dlang/dmd/pull/12339
Comment 5 Dlang Bot 2021-04-03 01:03:42 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