Fixed find symbol function by using 's' instead of 'sym' variable and added hash table size #532
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 pull request addresses a minor bug in the :find method for packages and significantly improves its error reporting for easier debugging.
Fixed Incorrect Variable in Error Message: The error message previously used the
sym
variable, which could display the wrong symbol when a search failed. This has been corrected to uses
, ensuring the message always shows the symbol that was actually being searched for.Enhanced Error Details: The error message has been expanded to be more informative. It now includes the search limit and the hash table's size, providing valuable context that can help diagnose a full hash table more quickly.
Quick check
Check code
Without this PR,
In this case
test2::*const27*
is not target symbol.With this PR
In this case
test2::*const60*
is target symbol and the program outputs correct error message.