Thread overview
[Issue 12031] Possible dollar handling inconsistencies in std.typecons.Typedef array
Dec 17, 2022
Iain Buclaw
Feb 11, 2023
Basile-z
September 23, 2014
https://issues.dlang.org/show_bug.cgi?id=12031

--- Comment #4 from bearophile_hugs@eml.cc ---
Now the error messages become:

test.d(8,13): Error: cannot implicitly convert expression (a.opSlice(__dollar -
4u, __dollar)) of type ubyte[] to ubyte[4]
test.d(12,13): Error: cannot implicitly convert expression (a.opSlice(21u,
25u)) of type ubyte[] to ubyte[4]

--
December 17, 2022
https://issues.dlang.org/show_bug.cgi?id=12031

Iain Buclaw <ibuclaw@gdcproject.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P2                          |P3

--
February 11, 2023
https://issues.dlang.org/show_bug.cgi?id=12031

Basile-z <b2.temp@gmx.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |b2.temp@gmx.com
          Component|dmd                         |phobos
           Hardware|x86                         |All
                 OS|Windows                     |All

--- Comment #5 from Basile-z <b2.temp@gmx.com> ---
This is not a compiler bug. The problem is that `std.typecons.TypeDef` uses an inner `std.typecons.Proxy` but as documented `Proxy` blocks implicit conversions.

Now the big question is if it's an "invalid issue" (and maybe that "TypeDef" DDOC is incomplete then) or if "TypeDef" implementation is not correct.

--