Sometimes when you meant to write
you might accidentally the equals sign and end up with
Since this is equivalent to local x; fun();, and thus perfectly legal, it can be hard to notice this mistake.
Perhaps this is something luacheck could point out?