With an extra indirection, the following code compiles and runs fine 
    
    
    type
      G[N:static[int]] = object
        v: int
      A = G[1]
      B = G[2]
    type
      F[U] = object
        v: U
      X = F[A]
      Y = F[B]
    static:
      echo(A is B)
      echo(X is Y)
    proc p(x:X) = echo "X:",x.v.v
    proc p(x:Y) = echo "Y:",x.v.v
    p(X(v:A(v:1)))
    p(Y(v:B(v:2)))
    

This means that A is B while F[A] isnot F[B]. It's inconsistent and confusing. 
Should F[A] is F[B] if A is B? Or should A isnot B in the first place, since 1 
isnot 2.

Reply via email to