Unify vocabulary related to the feature.

This commit is contained in:
wechman 2022-08-30 10:44:38 +02:00
parent 6d710920c5
commit c5640fb125
5 changed files with 6 additions and 6 deletions

View File

@ -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(

View File

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

View File

@ -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.