From 9a65b0392c967242cce970f977a6135c3dc04628 Mon Sep 17 00:00:00 2001 From: Rami Date: Thu, 20 Aug 2020 13:43:06 -0500 Subject: [PATCH] Fix for issue #223 This should fix #223, so maybe a a new version can be tagged waiting for an upstream fix if it is really a bug. I tried to preserve the assertion, let's see if any of the tests break. --- src/darray.jl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/darray.jl b/src/darray.jl index c4b12b1..7d7ecee 100644 --- a/src/darray.jl +++ b/src/darray.jl @@ -241,7 +241,10 @@ macro DArray(ex0::Expr) var = ex.args[d+1].args[1] ex.args[d+1] = :( $(esc(var)) = ($(ranges[d]))[I[$d]] ) end - return :( DArray((I::Tuple{Vararg{UnitRange{Int}}})->($ex0), + + fdef=:(local _ff(I::Tuple{Vararg{UnitRange{Int}}}) = $ex0) + + return :( DArray($fdef, tuple($(map(r->:(length($r)), ranges)...))) ) end