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
parent 5423915e5a
commit a77360da5b

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"