Skip to content

Commit

Permalink
fixup! fixup! fixup! Unexport with, at_with, and ScopedValue from Base
Browse files Browse the repository at this point in the history
  • Loading branch information
vchuravy committed Jan 24, 2024
1 parent 0149c61 commit 0bbbfc6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions base/scopedvalues.jl
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ Dynamic scopes are propagated across tasks.
# Examples
```jldoctest
julia> using Base.ScopedValues;
julia> const sval = ScopedValue(1);
julia> sval[]
Expand Down
6 changes: 3 additions & 3 deletions test/scopedvalues.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 0bbbfc6

Please sign in to comment.