mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
fixup! User-defined operators: Documentation
This commit is contained in:
parent
c583f56db7
commit
d52f5fd2aa
@ -50,10 +50,8 @@ performed even if none of these functions are called.
|
|||||||
|
|
||||||
If you define an operator for a user-defined type (``using {f as +} for T``), then
|
If you define an operator for a user-defined type (``using {f as +} for T``), then
|
||||||
the type (``T``), types of function parameters and the type of the function return value
|
the type (``T``), types of function parameters and the type of the function return value
|
||||||
have to be the same. The type (``T``) does not include data location.
|
have to be the same. One exception from this is the result type of comparison operators
|
||||||
But, data location of the function parameters and function return value must be
|
for which it is always ``bool``.
|
||||||
the same. There is an exception for comparison operators for which, the return value
|
|
||||||
type is always ``bool``.
|
|
||||||
|
|
||||||
The ``using A for B;`` directive is active only within the current
|
The ``using A for B;`` directive is active only within the current
|
||||||
scope (either the contract or the current module/source unit),
|
scope (either the contract or the current module/source unit),
|
||||||
|
Loading…
Reference in New Issue
Block a user