[Issue 12879] Wrong line number for run-time array cast misalignment error

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed May 25 18:10:16 UTC 2022


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

Ben <ben.james.jones at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |ben.james.jones at gmail.com
         Resolution|---                         |FIXED

--- Comment #1 from Ben <ben.james.jones at gmail.com> ---
Results on dmd 2.099.1

core.exception.AssertError@/dlang/dmd/linux/bin64/../../src/druntime/import/core/internal/array/casting.d(62):
An array of size 40 does not align on an array of size 35, so `void` cannot be
cast to `ubyte[7]`
----------------
??:? _d_assert_msg [0x5576b5122940]
/dlang/dmd/linux/bin64/../../src/druntime/import/core/internal/array/casting.d:62
pure nothrow @nogc @trusted void
core.internal.array.casting.onArrayCastError!().onArrayCastError(immutable(char)[],
ulong, immutable(char)[], ulong) [0x5576b511a283]
/dlang/dmd/linux/bin64/../../src/druntime/import/core/internal/array/casting.d:82
pure nothrow @nogc @trusted ubyte[7][]
core.internal.array.casting.__ArrayCast!(void, ubyte[7]).__ArrayCast(return
scope void[]) [0x5576b511a112]
./onlineapp.d:3 _Dmain [0x5576b511a077]

This looks like a descriptive and accurate error, so I think this should be
closed.  Is there an easy way to find out which version fixed this?  Do we
care?

--


More information about the Digitalmars-d-bugs mailing list