fixup! User-defined operators: Documentation

This commit is contained in:
Kamil Śliwak 2023-01-24 17:21:33 +01:00
parent c583f56db7
commit d52f5fd2aa

View File

@ -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),