diff options
author | cooldome <cdome@bk.ru> | 2018-11-19 07:44:49 +0000 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2018-11-19 08:44:49 +0100 |
commit | 9b9f5dee0b4810718a587354aaf4f352bc5c24bb (patch) | |
tree | 768e4bfbee37365dd37e094c7602121cfbd65e09 /tests/cpp | |
parent | ebcf9406be9ca04abb862d7d3a3ca16fc5d07a0c (diff) | |
download | Nim-9b9f5dee0b4810718a587354aaf4f352bc5c24bb.tar.gz |
Fixes discard bug in cpp codegen (#9747) [backport]
Fixes discard bug in cpp codegen
Diffstat (limited to 'tests/cpp')
-rw-r--r-- | tests/cpp/tcasts.nim | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/tests/cpp/tcasts.nim b/tests/cpp/tcasts.nim index 24ebb8f62..d968d87db 100644 --- a/tests/cpp/tcasts.nim +++ b/tests/cpp/tcasts.nim @@ -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 \ No newline at end of file |