From a397a7ce70a935b0c6f72a602f4300557d92f546 Mon Sep 17 00:00:00 2001 From: Ian Butterworth Date: Sun, 6 Oct 2024 20:38:04 -0400 Subject: [PATCH] Update base/scopedvalues.jl --- base/scopedvalues.jl | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/base/scopedvalues.jl b/base/scopedvalues.jl index fefcfdfccd5ba..39e3c2c076718 100644 --- a/base/scopedvalues.jl +++ b/base/scopedvalues.jl @@ -85,9 +85,7 @@ struct Scope values::ScopeStorage end -function Scope(parent::Scope) - return Scope(parent.values) -end +Scope(scope::Scope) = scope function Scope(parent::Union{Nothing, Scope}, key::ScopedValue{T}, value) where T val = convert(T, value)