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
@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
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
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
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
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