Hi, i'm trying to run this code mixing inheritance, concept and methods but i 
have some problems Below i have wrote a simplified version of my problem
    
    
    type
         A = ref object of RootObj
         B = ref object of A
         C = concept x
               x.a is int
         D = ref object
              a: int
    
    method f(a: A, c: C): int = # do something
    
    method f(b: B, c: C): int = # do something
    
    
    let my_b = B()
    let my_d = D()
    echo f(my_b, my_d) # compile and run, but execute the version for A
    
    
    Run

I'm sure that the cause of the problem is the concept C because removing it 
solve all the problems. _nimsuggest_ give me also a warning but i don't 
understand it in this context: _" generic method not attachable to object type 
is deprecated [Deprecated]"_

I don't know if this is normal or a bug, so i post it my problem

Reply via email to