mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-28 17:04:41 +00:00
(for `string` or any other key type). Independence is nice to ever change orders. So, change it to just `len` & a `doAssert` like the other test in the same file.
21 lines
374 B
Nim
21 lines
374 B
Nim
discard """
|
|
cmd: "nim cpp $file"
|
|
targets: "cpp"
|
|
"""
|
|
|
|
block: #5979
|
|
var a = 'a'
|
|
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")
|
|
doAssert t.len == 2
|