[nimsuggest] fix def call on identifier 2 times on the line (#20228)
- apparently TLineInfo's implementation of `==` ignores the column. After I fixed the code to use exact TLineInfo comparison I fixed several other issues hidden by that issue. - Replaced `tuple[sym, info]` with `SymInfoPair`
This commit is contained in:
parent
04e4a5ec0e
commit
d4c0d35b32
5 changed files with 76 additions and 48 deletions
|
|
@ -7,6 +7,8 @@ type
|
|||
proc test(f: Foo) =
|
||||
echo f.ba#[!]#r
|
||||
|
||||
#[!]#
|
||||
|
||||
discard """
|
||||
$nimsuggest --v3 --tester $file
|
||||
>use $1
|
||||
|
|
@ -22,4 +24,8 @@ outline skProc tv3.test proc (f: Foo){.gcsafe, locks: 0.} $file 7 5 "" 100
|
|||
sug skField bar string $file 5 4 "" 100 Prefix
|
||||
>globalSymbols test
|
||||
def skProc tv3.test proc (f: Foo){.gcsafe, locks: 0.} $file 7 5 "" 100
|
||||
>globalSymbols Foo
|
||||
def skType tv3.Foo Foo $file 4 2 "" 100
|
||||
>def $2
|
||||
>use $2
|
||||
"""
|
||||
|
|
|
|||
9
nimsuggest/tests/tv3_definition.nim
Normal file
9
nimsuggest/tests/tv3_definition.nim
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
|
||||
let foo = 30
|
||||
let bar = foo + fo#[!]#o + foo
|
||||
|
||||
discard """
|
||||
$nimsuggest --v3 --tester $file
|
||||
>def $1
|
||||
def skLet tv3_definition.foo int $file 2 4 "" 100
|
||||
"""
|
||||
Loading…
Add table
Add a link
Reference in a new issue