mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Unify vocabulary related to the feature.
This commit is contained in:
parent
6d710920c5
commit
c5640fb125
@ -3872,7 +3872,7 @@ void TypeChecker::endVisit(UsingForDirective const& _usingFor)
|
||||
m_errorReporter.typeError(
|
||||
9921_error,
|
||||
_usingFor.location(),
|
||||
"The \"using\" directive cannot be used to attach functions to enum types."
|
||||
"The \"using\" directive cannot be used to bind functions to enum types."
|
||||
);
|
||||
|
||||
Type const* normalizedType = TypeProvider::withLocationIfReference(
|
||||
|
@ -645,11 +645,11 @@ private:
|
||||
/**
|
||||
* Using for directive:
|
||||
*
|
||||
* 1. `using LibraryName for T` attaches all functions from the library `LibraryName` to the type `T`
|
||||
* 2. `using LibraryName for *` attaches to all types.
|
||||
* 3. `using {f1, f2, ..., fn} for T` attaches the functions `f1`, `f2`, ...,
|
||||
* 1. `using LibraryName for T` binds all functions from the library `LibraryName` to the type `T`
|
||||
* 2. `using LibraryName for *` binds to all types.
|
||||
* 3. `using {f1, f2, ..., fn} for T` binds the functions `f1`, `f2`, ...,
|
||||
* `fn`, respectively to `T`.
|
||||
* 4. `using {f1 as op1, f2 as op2, ..., fn as opn} for T` bounds operator `opn` to function `fn` for type `T`.
|
||||
* 4. `using {f1 as op1, f2 as op2, ..., fn as opn} for T` binds function `fn` to operator `opn` for type `T`.
|
||||
*
|
||||
* For version 3, T has to be implicitly convertible to the first parameter type of
|
||||
* all functions, and this is checked at the point of the using statement. For versions 1 and
|
||||
|
@ -10,4 +10,4 @@ function add(E, E) pure returns (E) {
|
||||
}
|
||||
|
||||
// ----
|
||||
// TypeError 9921: (0-23): The "using" directive cannot be used to attach functions to enum types.
|
||||
// TypeError 9921: (0-23): The "using" directive cannot be used to bind functions to enum types.
|
||||
|
Loading…
Reference in New Issue
Block a user