Skip to content

Commit ac5c26b

Browse files
CJ42cameel
authored andcommitted
docs: specifiy memory-safe in inline assembly is available since 0.8.13
1 parent f5f77a0 commit ac5c26b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

docs/assembly.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -364,8 +364,9 @@ in memory is automatically considered memory-safe and does not need to be annota
364364
an assembly block as memory-safe, but violate one of the memory assumptions, this **will** lead to incorrect and
365365
undefined behaviour that cannot easily be discovered by testing.
366366

367+
The annotation was introduced in version 0.8.13 and is not supported by older compilers.
367368
In case you are developing a library that is meant to be compatible across multiple versions
368-
of solidity, you can use a special comment to annotate an assembly block as memory-safe:
369+
of Solidity, you can use a special Natspec comment that has the same effect but is ignored in older versions:
369370

370371
.. code-block:: solidity
371372

0 commit comments

Comments
 (0)