Skip to content

Commit 9f22400

Browse files
committed
Broadcasts should return
1 parent 9f395af commit 9f22400

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/broadcast.jl

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,8 @@ end
387387
:block,
388388
ls.prepreamble,
389389
# Expr(:if, check_args_call(ls), Expr(:block, :(println("Primary code path!")), q), Expr(:block, :(println("Back up code path!")), :(Base.Broadcast.materialize!(dest, bc))))
390-
Expr(:if, check_args_call(ls), q, :(Base.Broadcast.materialize!(dest, bc)))
390+
Expr(:if, check_args_call(ls), q, :(Base.Broadcast.materialize!(dest, bc))),
391+
:dest
391392
)
392393
# isone(N) && pushfirst!(q.args, Expr(:meta,:inline))
393394
q
@@ -415,7 +416,8 @@ end
415416
q = Expr(
416417
:block,
417418
ls.prepreamble,
418-
Expr(:if, check_args_call(ls), q, :(Base.Broadcast.materialize!(dest′, bc)))
419+
Expr(:if, check_args_call(ls), q, :(Base.Broadcast.materialize!(dest′, bc))),
420+
:dest′
419421
)
420422
# isone(N) && pushfirst!(q.args, Expr(:meta,:inline))
421423
q

0 commit comments

Comments
 (0)