mirror of
https://github.com/nim-lang/Nim.git
synced 2026-02-13 06:43:52 +00:00
fix error in assertions document (#12925) [backport]
(cherry picked from commit cb0a20b9b4)
This commit is contained in:
@@ -44,7 +44,7 @@ template assert*(cond: untyped, msg = "") =
|
||||
## to be caught by unit testing frameworks.
|
||||
##
|
||||
## The compiler may not generate any code at all for ``assert`` if it is
|
||||
## advised to do so through the ``-d:release`` or ``--assertions:off``
|
||||
## advised to do so through the ``-d:danger`` or ``--assertions:off``
|
||||
## `command line switches <nimc.html#compiler-usage-command-line-switches>`_.
|
||||
const expr = astToStr(cond)
|
||||
assertImpl(cond, msg, expr, compileOption("assertions"))
|
||||
|
||||
Reference in New Issue
Block a user