summary refs log tree commit diff stats
path: root/tests/accept/run/tstrange.nim
blob: 13aab2302aab798a467e64e830b96b4957f8f469 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# 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