explicit side-effects override the inferred effect; refs #4659
This commit is contained in:
parent
89f3e21fc8
commit
e16bd735c4
1 changed files with 1 additions and 1 deletions
|
|
@ -935,7 +935,7 @@ proc trackProc*(s: PSym, body: PNode) =
|
|||
localError(s.info, errXhasSideEffects, s.name.s)
|
||||
if not t.gcUnsafe:
|
||||
s.typ.flags.incl tfGcSafe
|
||||
if not t.hasSideEffect:
|
||||
if not t.hasSideEffect and sfSideEffect notin s.flags:
|
||||
s.typ.flags.incl tfNoSideEffect
|
||||
if s.typ.lockLevel == UnspecifiedLockLevel:
|
||||
s.typ.lockLevel = t.maxLockLevel
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue