[bugfix] fix #11588, don't check if SharedTable is initialized
This commit is contained in:
parent
b7f8031e98
commit
326e3ad09d
3 changed files with 27 additions and 11 deletions
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
|
||||
Loading…
Add table
Add a link
Reference in a new issue