You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
https://dlang.org/spec/arrays.html 12.9.4 "The slice on the left and any slices on the right must not overlap."
Please clarify what this means and give an example of an error.
The following compiles and runs without errors despite left and right overlap (in fact they are the same):
void main() {
auto a = [3.0, 2.7, 3.4];
auto b = [2.3, 1.4, 2.5];
a[] = a[] + a[];
}
Is the above an undefined behavior? In this case, the spec should explicitly mention undefined behavior and the compiler should give an error/warning.
The text was updated successfully, but these errors were encountered:
Victor Porton (@vporton) reported this on 2020-08-16T07:36:08Z
Transferred from https://issues.dlang.org/show_bug.cgi?id=21167
Description
The text was updated successfully, but these errors were encountered: