Skip to content

Commit

Permalink
nimsuggest --ic:on compiles (#23298)
Browse files Browse the repository at this point in the history
  • Loading branch information
jmgomez authored Feb 9, 2024
1 parent a45f43d commit ae2cdce
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
1 change: 1 addition & 0 deletions compiler/seminst.nim
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,7 @@ proc fillMixinScope(c: PContext) =
p = p.next

proc getLocalPassC(c: PContext, s: PSym): string =
when defined(nimsuggest): return ""
if s.ast == nil or s.ast.len == 0: return ""
result = ""
template extractPassc(p: PNode) =
Expand Down
20 changes: 20 additions & 0 deletions nimsuggest/tests/tic.nim
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import std/[appdirs, assertions, cmdline, compilesettings, decls,
dirs, editdistance, effecttraits, enumerate, enumutils, envvars,
exitprocs, files, formatfloat, genasts, importutils,
isolation, jsonutils, logic, monotimes, objectdollar,
oserrors, outparams, packedsets, paths, private, setutils, sha1,
socketstreams, stackframes, staticos, strbasics, symlinks, syncio,
sysatomics, sysrand, tasks, tempfiles, time_t, typedthreads, varints,
vmutils, widestrs, with, wordwrap, wrapnils]

proc test(a: string, b:string) = discard
proc test(a: int) = discard

test(#[!]#

discard """
$nimsuggest --v3 --ic:off --tester $file
>con $1
con;;skProc;;tic.test;;proc (a: string, b: string);;$file;;10;;5;;"";;100
con;;skProc;;tic.test;;proc (a: int);;$file;;11;;5;;"";;100
"""

0 comments on commit ae2cdce

Please sign in to comment.