Commit 857e017
authored
Document changing view indices after construction as undefined behavior. (#59591)
Refs: https://discourse.julialang.org/t/is-it-defined-behavior-to-modify-iter-while-for-looping-over-it/132477/11?u=gunnarfarneback
```
julia> v = collect(1:7);
julia> i = collect(1:7);
julia> w = view(v, i);
julia> i[end] = 0;
julia> w[end]
128974949945120 # random value or segfault possible
```1 parent 0c8768f commit 857e017
1 file changed
+2
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
173 | 173 | | |
174 | 174 | | |
175 | 175 | | |
176 | | - | |
| 176 | + | |
| 177 | + | |
177 | 178 | | |
178 | 179 | | |
179 | 180 | | |
| |||
0 commit comments