summary refs log tree commit diff stats
path: root/tests/global/tglobalforvar.nim
blob: bc18f33f282183f76273f6c7744264996844a5aa (plain) (blame)
1
2
3
4
5
6
7
8
9
discard """
output: 100
"""

var funcs: seq[proc (): int {.nimcall.}] = @[]
for i in 0..10:
  funcs.add((proc (): int = return i * i))

echo(funcs[3]())