Linting the following code with Fennel's linter produces the "unused local foo" error:
(fn x [g] (set g.f (fn foo )))
While the function name is indeed unused in the function itself, the compiled Lua clearly uses it:
local function x(g) local function foo() end g.f = foo return nil end
Noticed that with one of my macros that generate functions with user-specified body, so I can't just omit the name in the macro, as it may be used for recursion.