Currently, returning a WithStmts that contains statements, inside a static initialiser, triggers a panic: "Expected no side-effects in static initializer". But that requirement is too tight: it's perfectly valid for static initialisers to contain statements, at least if they are declaration statements.
This issue currently blocks #1582. The solution used in #1407 works for local variables, but can't be extended to statics because of the panic.
Currently, returning a
WithStmtsthat contains statements, inside a static initialiser, triggers a panic: "Expected no side-effects in static initializer". But that requirement is too tight: it's perfectly valid for static initialisers to contain statements, at least if they are declaration statements.This issue currently blocks #1582. The solution used in #1407 works for local variables, but can't be extended to statics because of the panic.