mirror of
https://github.com/nim-lang/Nim.git
synced 2026-07-19 07:21:19 +00:00
Fixed operator precedence in example (#7912)
The order of operations was incorrect for the right-hand side of the `assert` statement on line 3199, based on the operator precedence for line 3197.
This commit is contained in:
committed by
Varriount
parent
3acedd4cd9
commit
8557a2e1a5
@@ -3196,7 +3196,7 @@ notation. (Thus an operator can have more than two parameters):
|
||||
# Multiply and add
|
||||
result = a * b + c
|
||||
|
||||
assert `*+`(3, 4, 6) == `*`(a, `+`(b, c))
|
||||
assert `*+`(3, 4, 6) == `+`(`*`(a, b), c)
|
||||
|
||||
|
||||
Export marker
|
||||
|
||||
Reference in New Issue
Block a user