dmd/compiler/test/runnable/test21424.d
2022-07-09 18:53:07 +02:00

12 lines
221 B
D

// https://issues.dlang.org/show_bug.cgi?id=21424
void main()
{
ubyte[10] buf;
size_t pos = 0;
size_t num = 5;
buf[pos++] += num;
assert(pos == 1);
assert(buf[0] == 5);
assert(buf[1] == 0);
}