I guess the following is buggy code dict = Dict(x=>x for x in 1:100); for x in keys(dict) delete!(dict, x) end
As we need to `collect(keys(...))` to make a copy. However the code above still runs with correct results. Even when it fails to return correct results, no error would be thrown. Just wondering in the language design point of view if the compiler or runtime can detect this sort of behaviour always?