hasobstacles
hasobstacles
is a bit weird. It's only defined for types, not for instances, and the generic definition hasobstacles(sim)
calls hasobstacles(sim.particles)
no matter the type of sim
, so it recurses until it errors or finds a property particles
in a struct. Is it only supposed to work on types or is there supposed to be a generic definition that forwards to the type of the argument? And also, why doesn't obstacles
just return something empty or nothing
on non-obstacle-containing containers? Fragen über Fragen... ;)