[Issue 15557] New: Common type of void* and const(int)* should be const(void)*, not const(int)*

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Mon Jan 11 18:34:04 PST 2016


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

          Issue ID: 15557
           Summary: Common type of void* and const(int)* should be
                    const(void)*, not const(int)*
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: nobody at puremagic.com
          Reporter: jakobovrum at gmail.com

---
void main()
{
    const(int)* a;
    void* b;
    auto c = true ? a : b;
    pragma(msg, typeof(c)); // const(int)*
}
---

typeof(c) should be const(void)*. This affects std.traits.CommonType.

--


More information about the Digitalmars-d-bugs mailing list