www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 20755] New: ImplicitConversionTargets of const class are

https://issues.dlang.org/show_bug.cgi?id=20755

          Issue ID: 20755
           Summary: ImplicitConversionTargets of const class are nonconst
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: phobos
          Assignee: nobody puremagic.com
          Reporter: default_357-line yahoo.de

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.

--
Apr 21 2020