Firstly `typeof(T.color)` is invalid cause `T` is a typedesc it does not have a 
`color` field. `typeof(default(T).color)` should work but Nim's generics always 
fight you to the death so this does not work.

If we define `template color(T: typedesc): untyped = typeof(default(T).color)` 
to delay resolution a bit, then do `fgColor*: color(T)` we get the macro to 
compile.

Reply via email to