[Issue 21881] Array operation fails to compile even though it really should

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Apr 30 00:53:50 UTC 2021


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

--- Comment #2 from Blatnik <blatblatnik at gmail.com> ---
I also don't understand why the error message I get from that is different from
other useless statements. For example:

1 + 1; // Error: `1 + 1` has no effect

int[1] i = [1];
i[] + i[]; // Error: array operation `i[] + i[]` without destination memory not
allowed.

I would have expected the same error message for both of these. It just seems
like an inconsistency though, and not an actual problem.

--


More information about the Digitalmars-d-bugs mailing list