I just want to know the name of the ref type:
echo x #error: expression: `$`(x)
echo x[] #(....)
echo typeof(x) #ref Bar:ObjectType
echo typeof(x[]) #Bar:ObjectType
echo ($typeof(x[])).split(":")[0] #Bar
I guess I am looking for some thing like typeof(x[]).plainName ?
If it is to be passed to other procs typeof(x[]) is enough. If you want to check the type for branching use is like when foo is typeof(x[[])
The string representation might change if the type is defined within the module or not AFAIK. If within the module there is no :ObjectType but I may remember incorrectly, anyway the stringification is not stable.
Yes, I was wondering also about this "ObjectType" in
https://github.com/StefanSalewski/gintro/blob/master/gintro/gimpl.nim#L33
https://github.com/StefanSalewski/gintro/blob/master/gintro/gimpl.nim#L61