From 7e9aca3e15e96f959c8bb5486bb30906a26d87a0 Mon Sep 17 00:00:00 2001 From: Andy Ferris Date: Mon, 25 Sep 2017 13:34:32 +1000 Subject: [PATCH] Use `@propagate_inbounds` instead of `@inbounds` for `next` --- base/dict.jl | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/base/dict.jl b/base/dict.jl index c4b03d9d88a8a..f547faeb86ac5 100644 --- a/base/dict.jl +++ b/base/dict.jl @@ -713,18 +713,18 @@ function start(t::Dict) return i end done(t::Dict, i) = i > length(t.vals) -function next(t::Dict{K,V}, i) where {K,V} - @inbounds return (Pair{K,V}(t.keys[i],t.vals[i]), skip_deleted(t,i+1)) +@propagate_inbounds function next(t::Dict{K,V}, i) where {K,V} + return (Pair{K,V}(t.keys[i],t.vals[i]), skip_deleted(t,i+1)) end isempty(t::Dict) = (t.count == 0) length(t::Dict) = t.count -function next(v::KeyIterator{<:Dict}, i) - @inbounds return (v.dict.keys[i], skip_deleted(v.dict,i+1)) +@propagate_inbounds function next(v::KeyIterator{<:Dict}, i) + return (v.dict.keys[i], skip_deleted(v.dict,i+1)) end -function next(v::ValueIterator{<:Dict}, i) - @inbounds return (v.dict.vals[i], skip_deleted(v.dict,i+1)) +@propagate_inbounds function next(v::ValueIterator{<:Dict}, i) + return (v.dict.vals[i], skip_deleted(v.dict,i+1)) end function filter_in_one_pass!(f, d::Associative)