mirror of
https://github.com/dlang/dmd.git
synced 2025-04-26 13:10:12 +03:00

Rethink lowering logic to account for parentheses and operator associativity. Signed-off-by: Teodor Dutu <teodor.dutu@gmail.com>
15 lines
378 B
D
15 lines
378 B
D
// https://issues.dlang.org/show_bug.cgi?id=24371
|
|
|
|
void main()
|
|
{
|
|
assert("b" ~ "c" == "bc");
|
|
assert(["a"] ~ "b" == ["a", "b"]);
|
|
assert(["a"] ~ ("b" ~ "c") == ["a", "bc"]);
|
|
|
|
auto strArr = ["a"];
|
|
assert(strArr ~ ("b" ~ "c") == ["a", "bc"]);
|
|
auto str = "c";
|
|
assert(["a"] ~ ("b" ~ str) == ["a", "bc"]);
|
|
|
|
assert(strArr ~ ("b" ~ str) == ["a", "bc"]);
|
|
}
|