Skip to content

Commit 7dfb591

Browse files
committed
follow upstream changes
1 parent 5d58557 commit 7dfb591

File tree

3 files changed

+2
-5
lines changed

3 files changed

+2
-5
lines changed

compiler/sem/lookups.nim

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -502,8 +502,6 @@ proc wrongRedefinition*(
502502
conflictsWith: PSym) =
503503
## Emit a redefinition error if in non-interactive mode
504504
if c.config.cmd != cmdInteractive:
505-
if sfTemplateParam in (s.flags + conflictsWith.flags):
506-
return
507505
c.config.localReport(info, reportSymbols(
508506
rsemRedefinitionOf, @[s, conflictsWith]))
509507

compiler/sem/semexprs.nim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1775,7 +1775,7 @@ proc builtinFieldAccess(c: PContext, n: PNode, flags: TExprFlags): PNode =
17751775
when defined(nimsuggest):
17761776
if c.config.cmd == cmdIdeTools:
17771777
suggestExpr(c, n)
1778-
if n.len > 0 and c.config.m.trackPos == n[1].info: suggestExprNoCheck(c, n)
1778+
if c.config.m.trackPos == n[1].info: suggestExprNoCheck(c, n)
17791779

17801780
let s = qualifiedLookUp(c, n, {checkAmbiguity, checkUndeclared, checkModule})
17811781
if s.isError:

compiler/tools/suggest.nim

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ const
7373
sep = '\t'
7474

7575
proc findDocComment(n: PNode): PNode =
76-
if n == nil or n.kind == nkError: return nil
76+
if n == nil: return nil
7777
if n.comment.len > 0: return n
7878
if n.kind in {nkStmtList, nkStmtListExpr, nkObjectTy, nkRecList} and n.len > 0:
7979
result = findDocComment(n[0])
@@ -543,7 +543,6 @@ proc suggestSym*(g: ModuleGraph; info: TLineInfo; s: PSym; usageSym: var PSym; i
543543
elif conf.ideCmd == ideHighlight and info.fileIndex == conf.m.trackPos.fileIndex:
544544
suggestResult(conf, symToSuggest(g, s, isLocal=false, ideHighlight, info, 100, PrefixMatch.None, false, 0))
545545
elif conf.ideCmd == ideOutline and isDecl and info.fileIndex == conf.m.trackPos.fileIndex:
546-
if s.kind == skTemp or {sfGenSym, sfTemplateParam} * s.flags != {}: return
547546
if "`gensym" in s.name.s: return # prevent constant in template show up
548547
suggestResult(conf, symToSuggest(g, s, isLocal=false, ideOutline, info, 100, PrefixMatch.None, false, 0))
549548

0 commit comments

Comments
 (0)