Fixes discard bug in cpp codegen (#9747) [backport]
Fixes discard bug in cpp codegen
This commit is contained in:
parent
ebcf9406be
commit
9b9f5dee0b
2 changed files with 13 additions and 10 deletions
|
|
@ -1,6 +1,6 @@
|
|||
discard """
|
||||
cmd: "nim cpp $file"
|
||||
output: ""
|
||||
output: '''{"vas": "kas", "123": "123"}'''
|
||||
targets: "cpp"
|
||||
"""
|
||||
|
||||
|
|
@ -9,3 +9,13 @@ block: #5979
|
|||
var p: pointer = cast[pointer](a)
|
||||
var c = cast[char](p)
|
||||
doAssert(c == 'a')
|
||||
|
||||
|
||||
#----------------------------------------------------
|
||||
# bug #9739
|
||||
import tables
|
||||
|
||||
var t = initTable[string, string]()
|
||||
discard t.hasKeyOrPut("123", "123")
|
||||
discard t.mgetOrPut("vas", "kas")
|
||||
echo t
|
||||
Loading…
Add table
Add a link
Reference in a new issue