glad you got it working!

it's possible to do so with less genericity, should you desire:

`concepts.nim`
    
    
    type
      Concept0* = concept C0, var varC0, type TC0
        varC0.copy_C0() is TC0
        varC0.init_C0()
      Concept1*[C0:Concept0] = concept C1, var varC1, type TC1
        copy_C1(varC1) is TC1
        init_C1(varC1, C0)
      Concept2*[C1:Concept1] = concept C2, var varC2, type TC2
        copy_C2(varC2) is TC2
        init_C2(varC2, C1)
    
    
    
    proc c0Init*(x: var Concept0) = x.init_C0()
    proc c0Copy*(x: var Concept0): Concept0 = x.copy_C0()
    
    proc c1Init*(x: var Concept1, y: Concept0) = x.init_C1(y)
    proc c1Copy*(x:var Concept1): Concept1 = x.copy_C1()
    
    proc c2Init*(x: var Concept2, y: Concept1) = x.init_C2(y)
    proc c2Copy*(x:var Concept2): Concept2 = x.copy_C2()
    
    
    Run

works with objects.nim/main.nim unchanged

minor point: `c2Copy` doesn't need to take a var parameter, sorry, i changed 
that in my answer i hope that didn't mess you up.

Reply via email to