Fix #21179 - Failure to convert const(T) to T after type is used in cast() (#21201)

This commit is contained in:
Dennis 2025-04-10 23:05:48 +02:00 committed by GitHub
parent bb25d82a3b
commit 1b34fea478
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 24 additions and 3 deletions

View file

@ -0,0 +1,11 @@
// https://github.com/dlang/dmd/issues/21179
void bigEndianToNative(ubyte[2] a) {}
void main()
{
ubyte[] arr;
const ubyte[2] bytes;
bigEndianToNative(bytes);
auto b = cast(const ubyte[2][]) arr;
}