Branch: refs/heads/main
Revision: 0c4e604
Author: lydia-duncan
Log Message:
Merge pull request #18546 from lydia-duncan/nonOperatorError
Add an error if a non-operator function is declared with the operator keyword
[reviewed by @dlongnecke-cray]
We don't support defining arbitrary operators yet, so error if someone tries to
declare one until we do.
Resolves #17853
With this new error, discovered that sometimes we overload the by operator with
the name chpl_by
and the align operator with chpl_align
so add those variations
to the list of potential operator names to check.
Update a test to use the operator keyword that had missed it, and update the
expected error message when using the operator
keyword with an unexpected
operator name so that the appropriate spacing was used. Now that those futures
pass, remove the .bad and .future files from them.
Passed a full paratest with futures
Modified Files:
R test/functions/operatorOverloads/errors/namedOperator.bad
R test/functions/operatorOverloads/errors/namedOperator.future
R test/functions/operatorOverloads/errors/namedOperator2.bad
R test/functions/operatorOverloads/errors/namedOperator2.future
M compiler/AST/symbol.cpp
M compiler/passes/checkParsed.cpp
M test/functions/diten/overloadBy.chpl
M test/functions/operatorOverloads/errors/namedOperator.good
M test/functions/operatorOverloads/errors/namedOperator2.good
Compare: https://github.com/chapel-lang/chapel/compare/9996189b283f...0c4e604849b8