diff --git a/src/arrays.jl b/src/arrays.jl index bfd06b46f..3d71a62a3 100644 --- a/src/arrays.jl +++ b/src/arrays.jl @@ -215,7 +215,9 @@ function make_shape(output_idx, expr, ranges=Dict()) end mi = matches[i] @assert !isempty(mi) - return Base.OneTo(length(get_extents(mi))) + ext = get_extents(mi) + ext isa Unknown && return Unknown() + return Base.OneTo(length(ext)) elseif i isa Integer return Base.OneTo(1) end