summary refs log tree commit diff stats
path: root/compiler
diff options
context:
space:
mode:
authorJake Leahy <jake@leahy.dev>2022-12-28 17:35:11 +1100
committerGitHub <noreply@github.com>2022-12-28 07:35:11 +0100
commit3d5dbf8f96a5106a3b817a45a926303bc5623786 (patch)
tree37f3436f3e051b523289612d07755a15157d99fc /compiler
parent9efa56a8bbacab2075a4c2fe4c5424d57b6eab46 (diff)
downloadNim-3d5dbf8f96a5106a3b817a45a926303bc5623786.tar.gz
Fix nimsuggest not suggesting fields in when theres static parameters (#21189)
Don't check against empty arguments

Add test case
Diffstat (limited to 'compiler')
-rw-r--r--compiler/sigmatch.nim2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/sigmatch.nim b/compiler/sigmatch.nim
index d05503c00..68068cd26 100644
--- a/compiler/sigmatch.nim
+++ b/compiler/sigmatch.nim
@@ -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