diff options
author | Andreas Rumpf <rumpf_a@web.de> | 2016-08-26 13:23:15 +0200 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2016-08-26 13:23:15 +0200 |
commit | e16bd735c48464ef5efcc48afbcbbd49cbf3cc74 (patch) | |
tree | 020fddc6dd26177bcce1a56bb97457ac6996a5f7 /compiler | |
parent | 89f3e21fc876e589de62f81aa1aa67e36eacc22e (diff) | |
download | Nim-e16bd735c48464ef5efcc48afbcbbd49cbf3cc74.tar.gz |
explicit side-effects override the inferred effect; refs #4659
Diffstat (limited to 'compiler')
-rw-r--r-- | compiler/sempass2.nim | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/sempass2.nim b/compiler/sempass2.nim index a8fb9ef91..3908fa26e 100644 --- a/compiler/sempass2.nim +++ b/compiler/sempass2.nim @@ -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 |