ZNTC0401: Function declaration is not allowed in statement position
ZNTC0401
Section titled “ZNTC0401”Function declaration is not allowed in statement position
Category: Parser: Declaration/Class
Reproduction
Section titled “Reproduction”if (true) function foo() {}How to fix
Section titled “How to fix”See the error message for cause and resolution.