Change the code:
    
    
    template create(x: int, T: typedesc): untyped = T(age: x)
    

to:
    
    
    template create(x: int, T: untyped): untyped = T(age: x)
    

All the code of above works!

Reply via email to