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)