Nim/tests/compile/tgeneric4.nim
Zahary Karadjov 3e79e9f981 some steps to improve the type mismatches with the new
generic instantiation logic
2013-08-19 01:45:16 +03:00

10 lines
149 B
Nim

type
TIDGen*[A: Ordinal] = object
next: A
free: seq[A]
proc newIDGen*[A]: TIDGen[A] =
newSeq result.free, 0
var x = newIDGen[int]()