fixes another effect inference bug [backport:1.6] (#19100)

* fixes another effect inference bug [backport:1.6]
This commit is contained in:
Andreas Rumpf 2021-11-07 16:38:02 +01:00 • committed by GitHub
commit fce89cb60a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 85 additions and 11 deletions

View file

@ -851,6 +851,9 @@ proc trackCall(tracked: PEffects; n: PNode) =
elif isIndirectCall(tracked, a):
assumeTheWorst(tracked, n, op)
gcsafeAndSideeffectCheck()
else:
if strictEffects in tracked.c.features and a.kind == nkSym and a.sym.kind in routineKinds:
propagateEffects(tracked, n, a.sym)
else:
mergeRaises(tracked, effectList[exceptionEffects], n)
mergeTags(tracked, effectList[tagEffects], n)