fixes #7291
This commit is contained in:
parent
8572085cc7
commit
15e044416f
2 changed files with 4 additions and 2 deletions
|
|
@ -30,7 +30,7 @@ proc cmpStrings(a, b: NimString): int {.inline, compilerProc.} =
|
||||||
if result == 0:
|
if result == 0:
|
||||||
result = a.len - b.len
|
result = a.len - b.len
|
||||||
else:
|
else:
|
||||||
result = 0
|
result = a.len - b.len
|
||||||
|
|
||||||
proc eqStrings(a, b: NimString): bool {.inline, compilerProc.} =
|
proc eqStrings(a, b: NimString): bool {.inline, compilerProc.} =
|
||||||
if a == b: return true
|
if a == b: return true
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,14 @@
|
||||||
discard """
|
discard """
|
||||||
cmd: r"nim c --hints:on $options --threads:on $file"
|
cmd: r"nim c --hints:on $options --threads:on $file"
|
||||||
|
output: '''@["", "a", "ha", "hi", "ho", "huu"]'''
|
||||||
"""
|
"""
|
||||||
|
|
||||||
import algorithm
|
import algorithm
|
||||||
|
|
||||||
# bug #1657
|
# bug #1657
|
||||||
var modules = @["hi", "ho", "ha", "huu"]
|
var modules = @["hi", "ho", "", "a", "ha", "huu"]
|
||||||
sort(modules, system.cmp)
|
sort(modules, system.cmp)
|
||||||
|
echo modules
|
||||||
|
|
||||||
type
|
type
|
||||||
MyType = object
|
MyType = object
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue