Bug 20755 – ImplicitConversionTargets of const class are nonconst

Status
RESOLVED
Resolution
FIXED
Severity
minor
Priority
P1
Component
phobos
Product
D
Version
D2
Platform
x86_64
OS
Linux
Creation time
2020-04-21T11:15:44Z
Last change time
2020-04-21T12:25:49Z
Keywords
pull
Assigned to
No Owner
Creator
FeepingCreature

Comments

Comment #0 by default_357-line — 2020-04-21T11:15:44Z
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 by dlang-bot — 2020-04-21T11:26:32Z
@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 by dlang-bot — 2020-04-21T12:25:49Z
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