diff options
author | chriseth <chris@ethereum.org> | 2018-07-04 20:09:46 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-07-04 20:09:46 +0800 |
commit | 4a332ab324ae1badafb43a5844863ccd98e85c63 (patch) | |
tree | 6f6e86a5b11fa2bad2fcd85f0432a621a2c7cb88 /docs/contracts.rst | |
parent | 476372243bac932ae876bf24c236d48870be2912 (diff) | |
parent | f5be38bff10b02ab5b7bc1125daa6fbe17f87b65 (diff) | |
download | dexon-solidity-4a332ab324ae1badafb43a5844863ccd98e85c63.tar dexon-solidity-4a332ab324ae1badafb43a5844863ccd98e85c63.tar.gz dexon-solidity-4a332ab324ae1badafb43a5844863ccd98e85c63.tar.bz2 dexon-solidity-4a332ab324ae1badafb43a5844863ccd98e85c63.tar.lz dexon-solidity-4a332ab324ae1badafb43a5844863ccd98e85c63.tar.xz dexon-solidity-4a332ab324ae1badafb43a5844863ccd98e85c63.tar.zst dexon-solidity-4a332ab324ae1badafb43a5844863ccd98e85c63.zip |
Merge pull request #4409 from ethereum/viewPureChecker
Enforce state mutability in view pure checker.
Diffstat (limited to 'docs/contracts.rst')
-rw-r--r-- | docs/contracts.rst | 8 |
1 files changed, 4 insertions, 4 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: |