You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
1
first foo definition
1st caller
2
third foo definition
2nd caller
But instead it looks like:
1
first foo definition
1st caller
2
second foo definition
1st caller
2
second foo definition
1st caller
2
second foo definition
1st caller
2
second foo definition
1st caller
There are 2 problems displayed in this example, the first is that the call tag is being overridden when the macro function's local context scope is being put on top of the current context. This overrides whatever macro functions that were defined within the same scope as the macro function with whatever their definition was at the time of the macro function being created. This overrides any macro functions that were defined in a lower level scope within the macro function.
This happening for the caller() macro is causing the infinite recursion (which gets stopped by max macro recursion depth).
This happening for the foo() macro is causing second foo definition to be output instead of third foo definition
The text was updated successfully, but these errors were encountered:
The result is supposed to look like:
But instead it looks like:
There are 2 problems displayed in this example, the first is that the call tag is being overridden when the macro function's local context scope is being put on top of the current context. This overrides whatever macro functions that were defined within the same scope as the macro function with whatever their definition was at the time of the macro function being created. This overrides any macro functions that were defined in a lower level scope within the macro function.
This happening for the
caller()
macro is causing the infinite recursion (which gets stopped by max macro recursion depth).This happening for the
foo()
macro is causingsecond foo definition
to be output instead ofthird foo definition
The text was updated successfully, but these errors were encountered: