summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorringabout <43030857+ringabout@users.noreply.github.com>2023-12-19 17:24:36 +0800
committerGitHub <noreply@github.com>2023-12-19 10:24:36 +0100
commit6618448ced6f4f6d65d830d355e819996f654b57 (patch)
treeee588fd8068b246ba936bda9584f5021390617e0
parent434e062e82b21ace37abb16f7388c07df74a0729 (diff)
downloadNim-6618448ced6f4f6d65d830d355e819996f654b57.tar.gz
fixes strictnotnil for func, method, converter (#23083)
-rw-r--r--compiler/sempass2.nim2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/sempass2.nim b/compiler/sempass2.nim
index e2d45a388..48a6b9d1c 100644
--- a/compiler/sempass2.nim
+++ b/compiler/sempass2.nim
@@ -1667,7 +1667,7 @@ proc trackProc*(c: PContext; s: PSym, body: PNode) =
       dataflowAnalysis(s, body)
 
       when false: trackWrites(s, body)
-  if strictNotNil in c.features and s.kind == skProc:
+  if strictNotNil in c.features and s.kind in {skProc, skFunc, skMethod, skConverter}:
     checkNil(s, body, g.config, c.idgen)
 
 proc trackStmt*(c: PContext; module: PSym; n: PNode, isTopLevel: bool) =