From 4ccaa1b595885a219c51cb2be56a00347928795f Mon Sep 17 00:00:00 2001 From: Tanmay Mohapatra Date: Mon, 10 Apr 2023 01:06:52 +0530 Subject: [PATCH] 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 --- stdlib/Distributed/test/distributed_exec.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stdlib/Distributed/test/distributed_exec.jl b/stdlib/Distributed/test/distributed_exec.jl index 44929a762b2c5..43e02c92b5a81 100644 --- a/stdlib/Distributed/test/distributed_exec.jl +++ b/stdlib/Distributed/test/distributed_exec.jl @@ -704,7 +704,7 @@ clear!(wp) # default_worker_pool! tests wp_default = Distributed.default_worker_pool() try - wp = CachingPool(workers()) + local wp = CachingPool(workers()) Distributed.default_worker_pool!(wp) @test [1:100...] == pmap(x->x, wp, 1:100) @test !isempty(wp.map_obj2ref)