mirror of
https://github.com/nim-lang/Nim.git
synced 2026-04-19 14:00:35 +00:00
fixes #7291
This commit is contained in:
@@ -30,7 +30,7 @@ proc cmpStrings(a, b: NimString): int {.inline, compilerProc.} =
|
||||
if result == 0:
|
||||
result = a.len - b.len
|
||||
else:
|
||||
result = 0
|
||||
result = a.len - b.len
|
||||
|
||||
proc eqStrings(a, b: NimString): bool {.inline, compilerProc.} =
|
||||
if a == b: return true
|
||||
|
||||
@@ -1,12 +1,14 @@
|
||||
discard """
|
||||
cmd: r"nim c --hints:on $options --threads:on $file"
|
||||
output: '''@["", "a", "ha", "hi", "ho", "huu"]'''
|
||||
"""
|
||||
|
||||
import algorithm
|
||||
|
||||
# bug #1657
|
||||
var modules = @["hi", "ho", "ha", "huu"]
|
||||
var modules = @["hi", "ho", "", "a", "ha", "huu"]
|
||||
sort(modules, system.cmp)
|
||||
echo modules
|
||||
|
||||
type
|
||||
MyType = object
|
||||
|
||||
Reference in New Issue
Block a user