Merge pull request #11598 from narimiran/fix-sharedtables

[bugfix] fix #11588, don't check if SharedTable is initialized
This commit is contained in:
Andreas Rumpf 2019-06-26 23:11:34 +02:00 • committed by GitHub
commit 48cbf1c496
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 27 additions and 11 deletions

View 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