Issue is that const FOO: .. is treated as a standalone item, not a variable declaration within foo, (e.g. similar if you nested fn bar() {} inside of foo). So the broader issue is attempting to slice items that aren't functions.
But also: is it possible to be able to slice FOO? Even if this doesn't panic, it's confusing for a user.
ex:
select FOO, get
Unknown arg span for owner_node
Issue is that
const FOO: ..
is treated as a standalone item, not a variable declaration withinfoo
, (e.g. similar if you nestedfn bar() {}
inside offoo
). So the broader issue is attempting to slice items that aren't functions.But also: is it possible to be able to slice FOO? Even if this doesn't panic, it's confusing for a user.