mirror of
https://github.com/nim-lang/Nim.git
synced 2026-01-02 19:22:40 +00:00
24 lines
305 B
Nim
24 lines
305 B
Nim
discard """
|
|
file: "tstrange.nim"
|
|
output: "hallo4"
|
|
"""
|
|
# test for extremely strange bug
|
|
|
|
proc ack(x: int, y: int): int =
|
|
if x != 0:
|
|
if y != 5:
|
|
return y
|
|
return x
|
|
return x+y
|
|
|
|
proc gen[T](a: T) =
|
|
write(stdout, a)
|
|
|
|
|
|
gen("hallo")
|
|
write(stdout, ack(5, 4))
|
|
#OUT hallo4
|
|
|
|
|
|
|