diff options
author | Andreas Rumpf <rumpf_a@web.de> | 2020-04-29 21:58:59 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-29 21:58:59 +0200 |
commit | d9e907c0e2a58630f7b57c0afbe51c05fcf6b3ab (patch) | |
tree | ee7ad5e4bf27372a763dda5426dcd3ebdb4bc9f0 /tests/arc/tarcmisc.nim | |
parent | 707367e1ca231d964ba82a92b642eb5efdc1aa7c (diff) | |
download | Nim-d9e907c0e2a58630f7b57c0afbe51c05fcf6b3ab.tar.gz |
fixes #14079 [backport:1.2] (#14163)
Diffstat (limited to 'tests/arc/tarcmisc.nim')
-rw-r--r-- | tests/arc/tarcmisc.nim | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/tests/arc/tarcmisc.nim b/tests/arc/tarcmisc.nim index 963ae9806..ce8e902c6 100644 --- a/tests/arc/tarcmisc.nim +++ b/tests/arc/tarcmisc.nim @@ -46,7 +46,7 @@ type proc `=destroy`(x: var AObj) = close(x.io) echo "closed" - + var x = B(io: newStringStream("thestream")) @@ -64,4 +64,14 @@ proc main() = cryptCTR(nonce2.toOpenArray(0, nonce2.len-1)) doAssert(nonce2 == "0A234567") -main() \ No newline at end of file +main() + +# bug #14079 +import std/algorithm + +let + n = @["c", "b"] + q = @[("c", "2"), ("b", "1")] + +assert n.sortedByIt(it) == @["b", "c"], "fine" +assert q.sortedByIt(it[0]) == @[("b", "1"), ("c", "2")], "fails under arc" |