Fix nimsuggest not suggesting fields in when theres static parameters (#21189)

Don't check against empty arguments

Add test case
This commit is contained in:
Jake Leahy 2022-12-28 17:35:11 +11:00 • committed by GitHub
commit 3d5dbf8f96
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 19 additions and 1 deletions

View file

@ -2055,7 +2055,7 @@ proc paramTypesMatchAux(m: var TCandidate, f, a: PType,
a.n == nil and
tfGenericTypeParam notin a.flags:
return newNodeIT(nkType, argOrig.info, makeTypeFromExpr(c, arg))
else:
elif arg.kind != nkEmpty:
var evaluated = c.semTryConstExpr(c, arg)
if evaluated != nil:
# Don't build the type in-place because `evaluated` and `arg` may point