It's actually enough to change just one of the type constraints to make it work:
    
    
    type
      TestType*[T :  AbstractType; Y : distinct AbstractType | AbstractType] = 
object
            a : T
            b : Y
    
    
    Run

That's nice, but the fact that the signature of `newTestType` _doesn 't_ have 
to be changed shows that either there's still something really wrong with Nim's 
type resolution or that it works in a way which so runs counter my intuition 
that it's not for me: the generic type parameters of `newTestType` are not 
`distinct`, hence `AbstractType` is bind once, so why does 
    
    
    t3 = newTestType(10, "mixed")
    
    Run

even compile?

Reply via email to