We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4944a41 commit 28ca05aCopy full SHA for 28ca05a
test/runtests.jl
@@ -142,12 +142,14 @@ end
142
sf()
143
end
144
145
+const sval_unassigned = ScopedValue{Int}()
146
@testset "get with default" begin
- const sval_unassigned = ScopedValue{Int}()
147
@test ScopedValues.get(sval_unassigned, nothing) == nothing
148
@test ScopedValues.get(sval_unassigned, -1) == -1
149
@with sval_unassigned=>10 begin
150
@test ScopedValues.get(sval_unassigned, -1) == 10
151
152
+ @static if VERSION >= v"1.9"
153
@test 0 == @allocations ScopedValues.get(sval_unassigned, nothing)
154
+ end
155
0 commit comments