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

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Oct 29 13:26:46 UTC 2022


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

apham <apz28 at hotmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |apz28 at hotmail.com

--- Comment #3 from apham <apz28 at hotmail.com> ---
Try different order & type -> still problem

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

onlineapp.d(5): Error: cannot implicitly convert expression `b` of type
`const(void)*` to `const(int)*`
const(int)*

--


More information about the Digitalmars-d-bugs mailing list