summary refs log blame commit diff stats
path: root/tests/generics/tgeneric0.nim
blob: 9292b729fa2acbae9c1e4336421c8103d574316d (plain) (tree)
1
2
3
4
5
6
7
8
9
10









                                                          







                                       
 
import tables

type
  TX = TTable[string, int]

proc foo(models: seq[TTable[string, float]]): seq[float] =
  result = @[]
  for model in models.items:
    result.add model["foobar"]

# bug #686
type TType[T; A] = array[A, T]

proc foo[T](p: TType[T, range[0..1]]) =
  echo "foo"
proc foo[T](p: TType[T, range[0..2]]) =
  echo "bar"