Scope of @time

Macros can do whatever they want (well, not quite). So, they can choose to introduce a new scope or not. You can have a look to what @time expands to with @macroexpand @time x=1. There is no scope-defining block defined, thus no new scope is made. This contrasts to @profile which uses a try-finally block which does introduce a new scope.

5 Likes