File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -65,20 +65,21 @@ const HAS_BEGIN_INDEXING = VERSION ≥ v"1.5.0-DEV.666"
6565
6666function need_dynamic_lens (ex)
6767 return foldtree (false , ex) do yes, x
68- (yes || x === :end || (HAS_BEGIN_INDEXING && x === :begin ) || x === :_ )
68+ (yes || x === :end || (HAS_BEGIN_INDEXING && x === :begin ) ||
69+ x == Expr (:end ) || (HAS_BEGIN_INDEXING && x == Expr (:begin )) || x === :_ )
6970 end
7071end
7172
7273function lower_index (collection:: Symbol , index, dim)
7374 if isexpr (index, :call )
7475 return Expr (:call , lower_index .(collection, index. args, dim)... )
75- elseif (index === :end )
76+ elseif (index === :end || index == Expr ( :end ) )
7677 if dim === nothing
7778 return :($ (Base. lastindex)($ collection))
7879 else
7980 return :($ (Base. lastindex)($ collection, $ dim))
8081 end
81- elseif HAS_BEGIN_INDEXING && (index === :begin )
82+ elseif HAS_BEGIN_INDEXING && (index === :begin || index == Expr ( :begin ) )
8283 if dim === nothing
8384 return :($ (Base. firstindex)($ collection))
8485 else
You can’t perform that action at this time.
0 commit comments