@@ -24,7 +24,7 @@ shape_string(inds::CartesianIndex) = join(Tuple(inds), '×')
24
24
iter = :(iterate (gen,st))
25
25
end
26
26
push! (stmts, :($ iter === nothing || generator_too_long_error ($ inds)))
27
- push! (stmts, :(SA ($ (args... ))))
27
+ push! (stmts, :(SA (( $ (args... ), ))))
28
28
Expr (:block , stmts... )
29
29
end
30
30
"""
@@ -92,7 +92,7 @@ function cat_any!(out, dims_before, dims_after, args::Vector{Any})
92
92
@views for arg in args
93
93
len = _cat_size (arg, catdim)
94
94
dest = out[dims_before... , i+ 1 : i+ len, dims_after... ]
95
- if arg isa AbstractArray
95
+ if arg isa AbstractArray
96
96
copyto! (dest, arg)
97
97
else
98
98
dest[] = arg
@@ -171,7 +171,7 @@ function static_array_gen(::Type{SA}, @nospecialize(ex), mod::Module) where {SA}
171
171
rngs = Any[Core. eval (mod, ex. args[i+ 1 ]. args[2 ]) for i = 1 : n_rng]
172
172
exprs = (:(f ($ (j... ))) for j in Iterators. product (rngs... ))
173
173
return quote
174
- let
174
+ let
175
175
f ($ (escall (rng_args). .. )) = $ (esc (ex. args[1 ]))
176
176
$ SA {$Tuple{$(size(exprs)...)}} ($ tuple ($ (exprs... )))
177
177
end
@@ -190,7 +190,7 @@ function static_array_gen(::Type{SA}, @nospecialize(ex), mod::Module) where {SA}
190
190
rngs = Any[Core. eval (mod, ex. args[i+ 1 ]. args[2 ]) for i = 1 : n_rng]
191
191
exprs = (:(f ($ (j... ))) for j in Iterators. product (rngs... ))
192
192
return quote
193
- let
193
+ let
194
194
f ($ (escall (rng_args). .. )) = $ (esc (ex. args[1 ]))
195
195
$ SA {$Tuple{$(size(exprs)...)},$T} ($ tuple ($ (exprs... )))
196
196
end
@@ -236,7 +236,7 @@ It supports:
236
236
237
237
2. comprehensions
238
238
!!! note
239
- The range of a comprehension is evaluated at global scope by the macro, and must be
239
+ The range of a comprehension is evaluated at global scope by the macro, and must be
240
240
made of combinations of literal values, functions, or global variables.
241
241
242
242
3. initialization functions
0 commit comments