Skip to content

[lldb][swift] Query name of problematic variable when emitting diagnostics #10780

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: swift/release/6.2
Choose a base branch
from

Conversation

felipepiovezan
Copy link

When evaluating an expression, LLDB attempts to find type information for all variables in scope. The current error messages imply that we only fail if the type for self cannot be realized, and this seems to be what happens. However, the code is written in such a way that allows for other failures too. This commit enhances the error message to print the name of the variable that caused the failure, instead of hardcoding "self".

…stics

When evaluating an expression, LLDB attempts to find type information
for all variables in scope. The current error messages imply that we
only fail if the type for self cannot be realized, and this seems to be
what happens. However, the code is written in such a way that allows for
other failures too. This commit enhances the error message to print the
name of the variable that caused the failure, instead of hardcoding
"self".
@felipepiovezan felipepiovezan requested a review from a team as a code owner June 2, 2025 22:55
@felipepiovezan
Copy link
Author

Talked offline about this, the function was indeed correct in that it always fails for self only, so the message is not exactly wrong. However it should not talk about the type of self, sometimes it is the value of self that fails. We should propagate the errors from value objects.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant