@@ -221,7 +221,7 @@ proc initVar(a: PEffects, n: PNode; volatileCheck: bool) =
221
221
if volatileCheck: makeVolatile (a, s)
222
222
for x in a.init:
223
223
if x == s.id:
224
- if noStrictDefs notin a.c.config.legacyFeatures and s.kind == skLet:
224
+ if strictDefs in a.c.features and s.kind == skLet:
225
225
localError (a.config, n.info, errXCannotBeAssignedTo %
226
226
renderTree (n, {renderNoComments}
227
227
))
@@ -379,7 +379,7 @@ proc useVar(a: PEffects, n: PNode) =
379
379
if s.typ.requiresInit:
380
380
message (a.config, n.info, warnProveInit, s.name.s)
381
381
elif a.leftPartOfAsgn <= 0 :
382
- if noStrictDefs notin a.c.config.legacyFeatures :
382
+ if strictDefs in a.c.features :
383
383
if s.kind == skLet:
384
384
localError (a.config, n.info, errLetNeedsInit)
385
385
else :
@@ -1664,7 +1664,7 @@ proc trackProc*(c: PContext; s: PSym, body: PNode) =
1664
1664
1665
1665
if not isEmptyType (s.typ.returnType) and
1666
1666
(s.typ.returnType.requiresInit or s.typ.returnType.skipTypes (abstractInst).kind == tyVar or
1667
- noStrictDefs notin c.config.legacyFeatures ) and
1667
+ strictDefs in c.features ) and
1668
1668
s.kind in {skProc, skFunc, skConverter, skMethod} and s.magic == mNone and
1669
1669
sfNoInit notin s.flags:
1670
1670
var res = s.ast[resultPos].sym # get result symbol
0 commit comments