doc: add FAQ entry for MethodError due to variable shadowing - #62822
Open
sentomas wants to merge 2 commits into
Open
doc: add FAQ entry for MethodError due to variable shadowing#62822sentomas wants to merge 2 commits into
sentomas wants to merge 2 commits into
Conversation
Added explanation for MethodError related to callable objects and common causes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds an entry to the FAQ section explaining MethodError: objects of type X are not callable.
This commonly occurs when a user accidentally assigns a value to a built-in function name in the REPL (e.g., sqrt = 5) or omits multiplication operators. I personally ran into this exact stumbling block while following along and executing the hypot function example from Section 9.3 of the Julia 1.12 documentation. Adding this to the FAQ or in the manual of 1.12 should help clarify this tricky environment state for other beginners!
