File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -1392,10 +1392,12 @@ end
1392
1392
@testset " Base/timing.jl" begin
1393
1393
@test Base. jit_total_bytes () >= 0
1394
1394
1395
- # sanity check `@allocations` returns what we expect in some very simple cases
1396
- @test (@allocations " a" ) == 0
1397
- @test (@allocations " a" * " b" ) == 0 # constant propagation
1398
- @test (@allocations " a" * Base. inferencebarrier (" b" )) == 1
1395
+ # sanity check `@allocations` returns what we expect in some very simple cases.
1396
+ # These are inside functions because `@allocations` uses `Experimental.@force_compile`
1397
+ # so can be affected by other code in the same scope.
1398
+ @test (() -> @allocations " a" )() == 0
1399
+ @test (() -> @allocations " a" * " b" )() == 0 # constant propagation
1400
+ @test (() -> @allocations " a" * Base. inferencebarrier (" b" ))() == 1
1399
1401
1400
1402
lock_conflicts () = parse (Int, read (` $(Base. julia_cmd ()) -tauto -E '
1401
1403
@lock_conflicts begin
You can’t perform that action at this time.
0 commit comments