move {.injectStmt.} to experimental; add a test (#18300)
* move {.injectStmt.} to experimental; add a test
* undocument and deprecat `.injectStmt` but keep its implementation until we have a replacement
This commit is contained in:
parent
590d457631
commit
6030e139b5
6 changed files with 53 additions and 15 deletions
|
|
@ -7432,17 +7432,6 @@ work properly (in particular regarding constructor and destructor) for
|
|||
proc main()=
|
||||
var a {.threadvar.}: Foo
|
||||
|
||||
InjectStmt pragma
|
||||
-----------------
|
||||
|
||||
The `injectStmt` pragma can be used to inject a statement before every
|
||||
other statement in the current module. It is only supposed to be used for
|
||||
debugging:
|
||||
|
||||
.. code-block:: nim
|
||||
{.injectStmt: gcInvariants().}
|
||||
|
||||
# ... complex code here that produces crashes ...
|
||||
|
||||
compile-time define pragmas
|
||||
---------------------------
|
||||
|
|
|
|||
|
|
@ -380,6 +380,7 @@ pass multiple blocks to a macro:
|
|||
# code to undo it
|
||||
|
||||
|
||||
|
||||
Special Operators
|
||||
=================
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue