workaround bug in sharedtables.withValue to unblock frozen CI on OSX (#18172)
This commit is contained in:
parent
5423915e5a
commit
a77360da5b
1 changed files with 4 additions and 0 deletions
|
|
@ -108,10 +108,14 @@ template withValue*[A, B](t: var SharedTable[A, B], key: A,
|
||||||
table.withValue("a", value):
|
table.withValue("a", value):
|
||||||
value[] = "m"
|
value[] = "m"
|
||||||
|
|
||||||
|
var flag = false
|
||||||
table.withValue("d", value):
|
table.withValue("d", value):
|
||||||
discard value
|
discard value
|
||||||
doAssert false
|
doAssert false
|
||||||
do: # if "d" notin table
|
do: # if "d" notin table
|
||||||
|
flag = true
|
||||||
|
|
||||||
|
if flag:
|
||||||
table["d"] = "n"
|
table["d"] = "n"
|
||||||
|
|
||||||
assert table.mget("a") == "m"
|
assert table.mget("a") == "m"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue