Yes it is.
What you see errors for the same reason it errors without the @static
, the macro needs to be evaluated BEFORE the toplevel expression (i.e. if ...
or @static if ...
) can run so the macro is evaluated BEFORE you imported the module. Repeat if
twice, first with import and second time with the macro should work. Note that for the import
/using
you don’t need @static
. You only need it for the @sk_import
since it’s a macro.