Thanks, yes I missed it, with pure it looks better :).

Would be even better if the last line `print_color(Color3.red)` would worked 
too without the explicit specification as there's enough information for 
compiler to extend `print_color(red)` into fully qualified enum name.
    
    
    type Color3* {.pure.} = enum red, green, blue
    type Color7* {.pure.} = enum red, orange, yellow, green, light_blue, blue, 
violet
    
    proc print_color(color: Color3): void = echo color
    
    print_color(Color3.red)
    
    
    Run

Reply via email to