Skip to content

Commit 4ccaa1b

Browse files
authored
fix new scope assignment warning in Distributed (#49303)
Disambiguate scope of the `wp` variable inside `try`-`catch` in distributed tests by qualifying it and suppress the warning reported in the tests. fixes #49289
1 parent 1f5e0a2 commit 4ccaa1b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

stdlib/Distributed/test/distributed_exec.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -704,7 +704,7 @@ clear!(wp)
704704
# default_worker_pool! tests
705705
wp_default = Distributed.default_worker_pool()
706706
try
707-
wp = CachingPool(workers())
707+
local wp = CachingPool(workers())
708708
Distributed.default_worker_pool!(wp)
709709
@test [1:100...] == pmap(x->x, wp, 1:100)
710710
@test !isempty(wp.map_obj2ref)

0 commit comments

Comments
 (0)