From 0bbbfc647a298c379483803d03aaa993c99ce4f9 Mon Sep 17 00:00:00 2001 From: Valentin Churavy Date: Wed, 24 Jan 2024 17:24:39 -0500 Subject: [PATCH] fixup! fixup! fixup! Unexport with, at_with, and ScopedValue from Base --- base/scopedvalues.jl | 2 ++ test/scopedvalues.jl | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/base/scopedvalues.jl b/base/scopedvalues.jl index 71c8a68785952..1b1b9a981b37d 100644 --- a/base/scopedvalues.jl +++ b/base/scopedvalues.jl @@ -19,6 +19,8 @@ Dynamic scopes are propagated across tasks. # Examples ```jldoctest +julia> using Base.ScopedValues; + julia> const sval = ScopedValue(1); julia> sval[] diff --git a/test/scopedvalues.jl b/test/scopedvalues.jl index 36f3d3961e343..197d5e73ace55 100644 --- a/test/scopedvalues.jl +++ b/test/scopedvalues.jl @@ -67,11 +67,11 @@ import Base.Threads: @spawn end @testset "show" begin - @test sprint(show, ScopedValue{Int}()) == "ScopedValue{$Int}(undefined)" - @test sprint(show, sval) == "ScopedValue{$Int}(1)" + @test sprint(show, ScopedValue{Int}()) == "Base.ScopedValues.ScopedValue{$Int}(undefined)" + @test sprint(show, sval) == "Base.ScopedValues.ScopedValue{$Int}(1)" @test sprint(show, Core.current_scope()) == "nothing" with(sval => 2.0) do - @test sprint(show, sval) == "ScopedValue{$Int}(2)" + @test sprint(show, sval) == "Base.ScopedValues.ScopedValue{$Int}(2)" objid = sprint(show, Base.objectid(sval)) @test sprint(show, Core.current_scope()) == "Base.ScopedValues.Scope(ScopedValue{$Int}@$objid => 2)" end