What exactly qualifies as „lexically enclosed use“ when using @sync?

No - lexically enclosed refers to “whatever the macro can see”. Since macros operate on the syntax level, before include is resolved/called (it’s treated like any other function), the macro cannot see what happens inside of the included file.

It’s helpful to use @macroexpand to see what a macro ends up doing.

1 Like