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
Using a function with defined is undefined behavior so anything is the expected and correct result. Though for your case assuming it wasn't undefined and you could use defined to check for a function the expected return for me would have been
true
true
this is because functions defined in the same file that they are called are treated as locks which is likely why print defined(foo) ends up calling the function the function.
results in the function being called by the last line:
Output:
Expected output:
The text was updated successfully, but these errors were encountered: