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"
65
65
66
66
function need_dynamic_lens (ex)
67
67
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 === :_ )
69
70
end
70
71
end
71
72
72
73
function lower_index (collection:: Symbol , index, dim)
73
74
if isexpr (index, :call )
74
75
return Expr (:call , lower_index .(collection, index. args, dim)... )
75
- elseif (index === :end )
76
+ elseif (index === :end || index == Expr ( :end ) )
76
77
if dim === nothing
77
78
return :($ (Base. lastindex)($ collection))
78
79
else
79
80
return :($ (Base. lastindex)($ collection, $ dim))
80
81
end
81
- elseif HAS_BEGIN_INDEXING && (index === :begin )
82
+ elseif HAS_BEGIN_INDEXING && (index === :begin || index == Expr ( :begin ) )
82
83
if dim === nothing
83
84
return :($ (Base. firstindex)($ collection))
84
85
else
You can’t perform that action at this time.
0 commit comments