[Issue 15241] struct literal implicitly converts void* to size_t

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Nov 24 20:16:55 UTC 2024


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

Nick Treleaven <nick at geany.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |nick at geany.org
         Resolution|---                         |FIXED

--- Comment #2 from Nick Treleaven <nick at geany.org> ---
(In reply to Cauterite from comment #0)
> 		auto p1 = cast(const void*) 1;
> 		auto h3 = HandleT( p1 ); // allowed

This was disallowed by the time of v2.068.2.

onlineapp.d(11): Error: cannot implicitly convert expression
`cast(const(void*))cast(size_t)1LU` of type `const(void*)` to `ulong`

> Related: http://dpaste.dzfl.pl/68de69a294c3

Server not responding.

--


More information about the Digitalmars-d-bugs mailing list