Skip to content

Commit 4be4369

Browse files
committed
Alternative check of is_produce_stmt
1 parent 89b4d80 commit 4be4369

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/copyable_task.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -374,8 +374,8 @@ get_value(x) = x
374374
expression, otherwise `false`.
375375
"""
376376
function is_produce_stmt(x)::Bool
377-
if Meta.isexpr(x, :invoke) && length(x.args) == 3
378-
return get_value(x.args[2]) === produce
377+
if Meta.isexpr(x, :invoke) && length(x.args) == 3 && x.args[1] isa Core.MethodInstance
378+
return x.args[1].specTypes <: Tuple{typeof(produce),Any}
379379
elseif Meta.isexpr(x, :call) && length(x.args) == 2
380380
return get_value(x.args[1]) === produce
381381
else

0 commit comments

Comments
 (0)