For example,
    
    
    type X = object
      i: int
    
    proc f[T](x: T): string =
      echo $x
    
    proc `$`(x: X): string =
      $(x.i)
    
    f(X())
    
    
    Run

prints `0`.
    
    
    type X = object
      i: int
    
    proc f(x: X): string =
      echo $x
    
    proc `$`(x: X): string =
      $(x.i)
    
    f(X())
    
    
    Run

prints `(i:0)`.

But I'm not sure if a generic proc will bind every symbol late.

Reply via email to