diff options
author | Daniel Kirchner <daniel@ekpyron.org> | 2018-07-03 17:02:20 +0800 |
---|---|---|
committer | Daniel Kirchner <daniel@ekpyron.org> | 2018-07-04 16:14:58 +0800 |
commit | d9a8f2aaceb077d5a3ef0bb2971d747b894aee7f (patch) | |
tree | d70a53b9bd0f230587c87adbd517625b094c76f6 /docs | |
parent | 0a738b4ac4b4b79654531061f1d11885655e86e8 (diff) | |
download | dexon-solidity-d9a8f2aaceb077d5a3ef0bb2971d747b894aee7f.tar.gz dexon-solidity-d9a8f2aaceb077d5a3ef0bb2971d747b894aee7f.tar.zst dexon-solidity-d9a8f2aaceb077d5a3ef0bb2971d747b894aee7f.zip |
Update documentation and Changelog.
Diffstat (limited to 'docs')
-rw-r--r-- | docs/contracts.rst | 8 | ||||
-rw-r--r-- | docs/miscellaneous.rst | 4 |
2 files changed, 6 insertions, 6 deletions
diff --git a/docs/contracts.rst b/docs/contracts.rst index 41240a9c..53e50656 100644 --- a/docs/contracts.rst +++ b/docs/contracts.rst @@ -485,9 +485,6 @@ The following statements are considered modifying the state: prevent modifications to the state on the level of the EVM by adding ``pragma experimental "v0.5.0";`` -.. warning:: - The compiler does not enforce yet that a ``view`` method is not modifying state. It raises a warning though. - .. index:: ! pure function, function;pure .. _pure-functions: @@ -529,12 +526,15 @@ In addition to the list of state modifying statements explained above, the follo It is a non-circumventable runtime checks done by the EVM. .. warning:: - Before version 0.4.17 the compiler didn't enforce that ``pure`` is not reading the state. + Before version 0.4.17 the compiler did not enforce that ``pure`` is not reading the state. It is a compile-time type check, which can be circumvented doing invalid explicit conversions between contract types, because the compiler can verify that the type of the contract does not do state-changing operations, but it cannot check that the contract that will be called at runtime is actually of that type. +.. warning:: + Before version 0.5.0 the compiler did not enforce that ``view`` is not writing the state. + .. index:: ! fallback function, function;fallback .. _fallback-function: diff --git a/docs/miscellaneous.rst b/docs/miscellaneous.rst index c19c8c59..1d5add9a 100644 --- a/docs/miscellaneous.rst +++ b/docs/miscellaneous.rst @@ -397,8 +397,8 @@ Function Visibility Specifiers Modifiers ========= -- ``pure`` for functions: Disallows modification or access of state - this is not enforced yet. -- ``view`` for functions: Disallows modification of state - this is not enforced yet. +- ``pure`` for functions: Disallows modification or access of state. +- ``view`` for functions: Disallows modification of state. - ``payable`` for functions: Allows them to receive Ether together with a call. - ``constant`` for state variables: Disallows assignment (except initialisation), does not occupy storage slot. - ``anonymous`` for events: Does not store event signature as topic. |