mirror of
https://github.com/vlang/v.git
synced 2025-09-11 08:25:42 -04:00
doc: add %
in op overloading section
This commit is contained in:
parent
1848eb0973
commit
8e2a8cc7f3
@ -1864,7 +1864,7 @@ in order to improve readability:
|
|||||||
|
|
||||||
To improve safety and maintainability, operator overloading is limited:
|
To improve safety and maintainability, operator overloading is limited:
|
||||||
|
|
||||||
- It's only possible to overload `+, -, *, /` operators.
|
- It's only possible to overload `+, -, *, /, %` operators.
|
||||||
- Calling other functions inside operator functions is not allowed.
|
- Calling other functions inside operator functions is not allowed.
|
||||||
- Operator functions can't modify their arguments.
|
- Operator functions can't modify their arguments.
|
||||||
- Both arguments must have the same type (just like with all operators in V).
|
- Both arguments must have the same type (just like with all operators in V).
|
||||||
|
Loading…
x
Reference in New Issue
Block a user