mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Disallow conversion between unrelated contract types.
This commit is contained in:
committed by
Alex Beregszaszi
parent
21888e246b
commit
c8232d9759
@@ -1,5 +1,7 @@
|
||||
.. index:: ! contract
|
||||
|
||||
.. _contracts:
|
||||
|
||||
##########
|
||||
Contracts
|
||||
##########
|
||||
|
||||
@@ -192,6 +192,23 @@ The ``.gas()`` option is available on all three methods, while the ``.value()``
|
||||
.. note::
|
||||
The use of ``callcode`` is discouraged and will be removed in the future.
|
||||
|
||||
Contract Types
|
||||
--------------
|
||||
|
||||
Every :ref:`contract<contracts>` defines its own type. Contracts can be implicitly converted
|
||||
to contracts they inherit from. They can be explicitly converted from and to ``address`` types.
|
||||
|
||||
The data representation of a contract is identical to that of the ``address`` type and
|
||||
this type is also used in the :ref:`ABI<ABI>`.
|
||||
|
||||
Contracts do not support any operators.
|
||||
|
||||
The members of contract types are the external functions of the contract including
|
||||
public state variables.
|
||||
|
||||
.. note::
|
||||
Starting with version 0.5.0 contracts do not derive from the address type, but can still be explicitly converted to address.
|
||||
|
||||
.. index:: byte array, bytes32
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user