mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-28 17:04:41 +00:00
* remove echo statements * Update tests/vm/triangle_array.nim * Update tests/vm/tyaytypedesc.nim Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com> Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com>
15 lines
283 B
Nim
15 lines
283 B
Nim
# bug #1023
|
|
|
|
|
|
type Quadruple = tuple[a, b, c, d: int]
|
|
|
|
proc `+`(s, t: Quadruple): Quadruple =
|
|
(a: s.a + t.a, b: s.b + t.b, c: s.c + t.c, d: s.d + t.d)
|
|
|
|
const
|
|
A = (a: 0, b: -1, c: 0, d: 1)
|
|
B = (a: 0, b: -2, c: 1, d: 0)
|
|
C = A + B
|
|
|
|
doAssert $C.d & " == " & $(A+B).d == "1 == 1"
|