File tree Expand file tree Collapse file tree 2 files changed +4
-1
lines changed Expand file tree Collapse file tree 2 files changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -534,7 +534,7 @@ function make_atomic(order, ex)
534534 elseif isexpr (ex, :call , 3 )
535535 return make_atomic (order, ex. args[2 ], ex. args[1 ], ex. args[3 ])
536536 elseif ex. head === :(= )
537- l, r = ex. args[1 ], ex. args[2 ]
537+ l, r = ex. args[1 ], esc ( ex. args[2 ])
538538 if is_expr (l, :., 2 )
539539 ll, lr = esc (l. args[1 ]), esc (l. args[2 ])
540540 return :(setproperty! ($ ll, $ lr, $ r, $ order))
Original file line number Diff line number Diff line change @@ -299,6 +299,9 @@ let a = ARefxy(1, -1)
299299 @test 1 === @atomic a. x
300300 @test 2 === @atomic :sequentially_consistent a. x = 2
301301 @test 3 === @atomic :monotonic a. x = 3
302+ local four = 4
303+ @test 4 === @atomic :monotonic a. x = four
304+ @test 3 === @atomic :monotonic a. x = four - 1
302305 @test_throws ConcurrencyViolationError @atomic :not_atomic a. x = 2
303306 @test_throws ConcurrencyViolationError @atomic :not_atomic a. x
304307 @test_throws ConcurrencyViolationError @atomic :not_atomic a. x += 1
You can’t perform that action at this time.
0 commit comments