Skip to content

Commit 208ba61

Browse files
authored
Merge pull request #11866 from ethereum/clarifyExample
Clarify function call options example.
2 parents 5e5f49d + 9033660 commit 208ba61

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

docs/control-structures.rst

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,10 @@ otherwise, the ``value`` option would not be available.
105105
.. warning::
106106
Be careful that ``feed.info{value: 10, gas: 800}`` only locally sets the
107107
``value`` and amount of ``gas`` sent with the function call, and the
108-
parentheses at the end perform the actual call. So in this case, the
109-
function is not called and the ``value`` and ``gas`` settings are lost.
108+
parentheses at the end perform the actual call. So
109+
``feed.info{value: 10, gas: 800}`` does not call the function and
110+
the ``value`` and ``gas`` settings are lost, only
111+
``feed.info{value: 10, gas: 800}()`` performs the function call.
110112

111113
Due to the fact that the EVM considers a call to a non-existing contract to
112114
always succeed, Solidity uses the ``extcodesize`` opcode to check that

0 commit comments

Comments
 (0)