diff --git a/doc/docs.md b/doc/docs.md index 7edd93b3a48cf6..bfc754b9dd93f0 100644 --- a/doc/docs.md +++ b/doc/docs.md @@ -6191,6 +6191,8 @@ To improve safety and maintainability, operator overloading is limited. - When overriding `<` and `==`, the return type must be strictly `bool`. - Both arguments must have the same type (just like with all operators in V). +- Overloaded operators have to return the same type as the argument + (the exceptions are `<` and `==`). #### Other restrictions