I am not sure that I am understanding how the var return type work, I have this
code:
proc findComponent*(e: var Entity, T: typedesc): Option[var T] =
for c in e.components.mitems:
if c of T:
result = some(T(c))
result = none(var T)
Run
I am trying to find a component in e, then return an var of that component, I
get this error:
Error: type mismatch: got <Option[physics.TransformComponent]> but expected
'Option[var None]'
Run
What does the `var None` in the return type mean? Is it just not possible to
wrap a var in an Option?