Add back markUsed in symChoice

This commit is contained in:
SirOlaf
2024-03-26 00:20:35 +01:00
parent 3d780cdde4
commit fe42adeea7
2 changed files with 3 additions and 1 deletions

View File

@@ -67,6 +67,8 @@ proc symChoice(c: PContext, n: PNode, s: PSym, r: TSymChoiceRule;
# for instance 'nextTry' is both in tables.nim and astalgo.nim ...
if not isField or sfGenSym notin s.flags:
result = newSymNode(s, info)
markUsed(c, info, s)
onUse(info, s)
else:
result = n
elif i == 0:

View File

@@ -14,5 +14,5 @@ main()
discard """
$nimsuggest --tester $file
>def $1
def;;skProc;;tgenerics.printHelloValue;;proc (hello: Hello[printHelloValue.T]);;$file;;5;;5;;"";;100
def;;skProc;;tgenerics.printHelloValue.printHelloValue;;proc (hello: Hello[system.float]){.gcsafe, raises: <inferred> [].};;$file;;5;;5;;"";;100
"""