workaround bug in sharedtables.withValue to unblock frozen CI on OSX (#18172)

This commit is contained in:
flywind 2021-06-05 03:41:13 +08:00 • committed by GitHub
commit a77360da5b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -108,10 +108,14 @@ template withValue*[A, B](t: var SharedTable[A, B], key: A,
table.withValue("a", value):
value[] = "m"
var flag = false
table.withValue("d", value):
discard value
doAssert false
do: # if "d" notin table
flag = true
if flag:
table["d"] = "n"
assert table.mget("a") == "m"