strict func: much better error messages (#15068)

* strict func: much better error messages
* documented the 'strict funcs' mode
This commit is contained in:
Andreas Rumpf 2020-07-25 19:36:53 +02:00 • committed by GitHub
commit 2aca748ddd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 133 additions and 46 deletions

View file

@ -1,6 +1,9 @@
discard """
errormsg: "'mutate' can have side effects"
line: 25
nimout: '''an object reachable from 'n' is potentially mutated
tfuncs_cannot_mutate.nim(34, 15) the mutation is here
tfuncs_cannot_mutate.nim(32, 7) is the statement that connected the mutation to the parameter'''
line: 28
"""
{.experimental: "strictFuncs".}