* test CI * fixes #19457 * add comments Co-authored-by: sandytypical <43030857+xflywind@users.noreply.github.com>
This commit is contained in:
parent
95614089ac
commit
fe8feb46c6
3 changed files with 48 additions and 15 deletions
16
tests/arc/t19457.nim
Normal file
16
tests/arc/t19457.nim
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
discard """
|
||||
matrix: "--gc:refc; --gc:arc"
|
||||
"""
|
||||
|
||||
# bug #19457
|
||||
proc gcd(x, y: seq[int]): seq[int] =
|
||||
var
|
||||
a = x
|
||||
b = y
|
||||
while b[0] > 0:
|
||||
let c = @[a[0] mod b[0]]
|
||||
a = b
|
||||
b = c
|
||||
return a
|
||||
|
||||
doAssert gcd(@[1], @[2]) == @[1]
|
||||
Loading…
Add table
Add a link
Reference in a new issue