refactoring, fixes yet another strictFuncs regression (#15446)
This commit is contained in:
parent
b703f02ad2
commit
2b91845f1d
3 changed files with 34 additions and 8 deletions
|
|
@ -1244,7 +1244,10 @@ proc trackProc*(c: PContext; s: PSym, body: PNode) =
|
|||
|
||||
var mutationInfo = MutationInfo()
|
||||
if {strictFuncs, views} * c.features != {}:
|
||||
var partitions = computeGraphPartitions(s, body, g.config)
|
||||
var goals: set[Goal] = {}
|
||||
if strictFuncs in c.features: goals.incl constParameters
|
||||
if views in c.features: goals.incl borrowChecking
|
||||
var partitions = computeGraphPartitions(s, body, g.config, goals)
|
||||
if not t.hasSideEffect and t.hasDangerousAssign:
|
||||
t.hasSideEffect = varpartitions.hasSideEffect(partitions, mutationInfo)
|
||||
if views in c.features:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue