new minor language feature: .noSideEffect blocks like .gcsafe blocks

This commit is contained in:
Andreas Rumpf 2018-11-26 23:28:02 +01:00
commit 413580bc04
7 changed files with 30 additions and 12 deletions

View file

@ -6755,6 +6755,16 @@ routines marked as ``noSideEffect``.
func `+` (x, y: int): int
To override the compiler's side effect analysis a ``{.noSideEffect.}``
pragma block can be used:
.. code-block:: nim
func f() =
{.noSideEffect.}:
echo "test"
compileTime pragma
------------------
The ``compileTime`` pragma is used to mark a proc or variable to be used at