mirror of
https://github.com/nim-lang/Nim.git
synced 2026-01-04 20:17:42 +00:00
workaround bug in sharedtables.withValue to unblock frozen CI on OSX (#18172)
This commit is contained in:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user