type
   L* = object
      hash_size: int

template init(c: var typed, hash: int = 0) =
   if (hash == 0):
      c.hash_size = 111
   else:
      c.hash_size = 123

var c: L
init(c, 4)
echo(repr c)

echo "ok"
