The following should work. It may not be what you want though, which I believe 
is 'subtyping in the generic constraints', right?
    
    
    type
      Foo = object of RootObj
      Bar = object of Foo
      
      Baz[T: Foo | Bar] = object
        myAttribute: T
    
    let baz = Baz[Foo]()  # compiles
    let baz2 = Baz[Bar]()
    
    
    Run

Reply via email to