> Error: overloaded 'initElement' leads to ambiguous calls

You tried to overload using generic but actually proc overload usually done 
with argument types. When you defined generic, it's actually creating overload 
proc based on argument type, for example
    
    
    proc add[T: SomeInteger](a, b: T): T =
       a + b
    
    discard add(4'u32, 5'u32)
    discard add(4'i32, 5'i32)
    
    
    Run

would actually have
    
    
    proc add(a, b: uint32): uint32 = a + b
    proc add(a, b: int32): int32 = a + b
    
    
    Run

CMIIW

Reply via email to