Re: Problem with the generic of sequence.

2017-03-26 Thread slangmgh
There is simple version to show the problem. import typetraits type Foo[T] = ref object x: T proc `@@`*[T](a: T): Foo[T] = new(result); result.x = a proc `$`*[T](f: Foo[T]): string = "Foo[" & $f.x & "]" type Bar[T] = Foo[Foo[T]] # OOPS

Problem with the generic of sequence.

2017-03-25 Thread slangmgh
A compiler problem when I using generic. the code: import sequtils, typetraits type Point = object x,y: int rseq[T] = ref object inq: ref seq[T] Vector[T] = rseq[T] proc P(x, y: int): Point = Point(x: x, y: y) proc