Your idea should work but you need to extract the type using .(type) and a pointer.
You can test your code using print(*T.(type)) for instance.
I pointed you to a known issue as you may try a switch type which need to be used very strictly.
Your idea should work but you need to extract the type using .(type) and a pointer.
You can test your code using print(*T.(type)) for instance.
I pointed you to a known issue as you may try a switch type which need to be used very strictly.