mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-29 01:14:41 +00:00
fixes #1657
This commit is contained in:
@@ -960,9 +960,13 @@ proc builtinFieldAccess(c: PContext, n: PNode, flags: TExprFlags): PNode =
|
||||
|
||||
var s = qualifiedLookUp(c, n, {checkAmbiguity, checkUndeclared})
|
||||
if s != nil:
|
||||
markUsed(n.sons[1].info, s)
|
||||
if s.kind in OverloadableSyms:
|
||||
result = symChoice(c, n, s, scClosed)
|
||||
else:
|
||||
markUsed(n.sons[1].info, s)
|
||||
result = semSym(c, n, s, flags)
|
||||
styleCheckUse(n.sons[1].info, s)
|
||||
return semSym(c, n, s, flags)
|
||||
return
|
||||
|
||||
n.sons[0] = semExprWithType(c, n.sons[0], flags+{efDetermineType})
|
||||
#restoreOldStyleType(n.sons[0])
|
||||
|
||||
9
tests/overload/tsystemcmp.nim
Normal file
9
tests/overload/tsystemcmp.nim
Normal file
@@ -0,0 +1,9 @@
|
||||
discard """
|
||||
cmd: r"nim c --hints:on $options --threads:on $file"
|
||||
"""
|
||||
|
||||
import algorithm
|
||||
|
||||
# bug #1657
|
||||
var modules = @["hi", "ho", "ha", "huu"]
|
||||
sort(modules, system.cmp)
|
||||
Reference in New Issue
Block a user