D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 20755 - ImplicitConversionTargets of const class are nonconst
Summary: ImplicitConversionTargets of const class are nonconst
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: phobos (show other issues)
Version: D2
Hardware: x86_64 Linux
: P1 minor
Assignee: No Owner
URL:
Keywords: pull
Depends on:
Blocks:
 
Reported: 2020-04-21 11:15 UTC by FeepingCreature
Modified: 2020-04-21 12:25 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 FeepingCreature 2020-04-21 11:15:44 UTC
Repro:

static assert(is(ImplicitConversionTargets!(const A) == const Object));

Fails because ImplicitConversionTargets!(const A) is nonconst Object.

"Caused" by the PR https://github.com/dlang/phobos/pull/7313 for 15940 - previously, ImplicitConversionTargets for const classes would not give any result.
Comment 1 Dlang Bot 2020-04-21 11:26:32 UTC
@FeepingCreature created dlang/phobos pull request #7452 "Fix/issue 20755 implicitconversiontargets const class" fixing this issue:

- Fix issue 20755: keep constness in ImplicitConversionTargets!(const/immutable class)

https://github.com/dlang/phobos/pull/7452
Comment 2 Dlang Bot 2020-04-21 12:25:49 UTC
dlang/phobos pull request #7452 "Fix/issue 20755 implicitconversiontargets const class" was merged into master:

- cc8537110e2d7538abe3b59048afd1fc582adb95 by Mathis Beer:
  Fix issue 20755: keep constness in ImplicitConversionTargets!(const/immutable class)

https://github.com/dlang/phobos/pull/7452