dmd/compiler/test/runnable/test24078.d
Teodor Dutu b349b6d0de Fix Issue 24078 - Fold constants on array concatenation only for strings
Without this limitation, the code could incorrectly concatenate
`["c"] ~ "a" ~ "b"` as `["c"] ~ "ab"`, which was incorrect.

Signed-off-by: Teodor Dutu <teodor.dutu@gmail.com>
2023-08-19 10:21:56 +02:00

6 lines
116 B
D

//https://issues.dlang.org/show_bug.cgi?id=24078
void main()
{
assert(["c"] ~ "a" ~ "b" == ["c", "a", "b"]);
}