fixes strictnotnil for func, method, converter (#23083)

This commit is contained in:
ringabout
2023-12-19 17:24:36 +08:00
committed by GitHub
parent 434e062e82
commit 6618448ced

View File

@@ -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) =