From 17443f458a311def7131dcaef00195dff3778da1 Mon Sep 17 00:00:00 2001 From: Alex Beregszaszi Date: Thu, 16 Mar 2017 11:08:21 +0000 Subject: [PATCH] Explain that .value() is only available if contract function is marked payable --- docs/control-structures.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/control-structures.rst b/docs/control-structures.rst index b1e166445..a2d34274e 100644 --- a/docs/control-structures.rst +++ b/docs/control-structures.rst @@ -127,8 +127,8 @@ the gas can be specified with special options ``.value()`` and ``.gas()``, respe function callFeed() { feed.info.value(10).gas(800)(); } } -The modifier ``payable`` has to be used for ``info``, because otherwise, -we would not be able to send Ether to it in the call ``feed.info.value(10).gas(800)()``. +The modifier ``payable`` has to be used for ``info``, because otherwise, the `.value()` +option would not be available. Note that the expression ``InfoFeed(addr)`` performs an explicit type conversion stating that "we know that the type of the contract at the given address is ``InfoFeed``" and