mirror of
https://github.com/nim-lang/Nim.git
synced 2026-05-01 11:34:43 +00:00
[bugfix] fix #11588, don't check if SharedTable is initialized
(cherry picked from commit 326e3ad09d)
This commit is contained in:
14
tests/stdlib/tsharedtable.nim
Normal file
14
tests/stdlib/tsharedtable.nim
Normal file
@@ -0,0 +1,14 @@
|
||||
discard """
|
||||
output: '''
|
||||
'''
|
||||
"""
|
||||
|
||||
import sharedtables
|
||||
|
||||
var table: SharedTable[int, int]
|
||||
|
||||
init(table)
|
||||
table[1] = 10
|
||||
assert table.mget(1) == 10
|
||||
assert table.mgetOrPut(3, 7) == 7
|
||||
assert table.mgetOrPut(3, 99) == 7
|
||||
Reference in New Issue
Block a user