Skip to content

[lldb] Avoid returning a false positive error when reaching an ObjC b… #10499

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

Merged
merged 1 commit into from
Apr 18, 2025

Conversation

adrian-prantl
Copy link

…ase class

in SwiftLanguageRuntime::GetIndexOfChildMemberWithName().

My understanding is that the loop should stop once we reach an ObjC base class, because any ivars in the base class will be children of the artificial base class child.

rdar://149329166

@adrian-prantl
Copy link
Author

@swift-ci test

…ase class

in SwiftLanguageRuntime::GetIndexOfChildMemberWithName().

My understanding is that the loop should stop once we reach an ObjC
base class, because any ivars in the base class will be children of
the artificial base class child.

rdar://149329166
@adrian-prantl
Copy link
Author

@swift-ci test

@skipUnlessDarwin
@swiftTest
def test(self):
"""Test accessing a static member from a member function"""

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test accessing a static member from an ObjC inherited class's member function?

@adrian-prantl adrian-prantl requested a review from fredriss April 17, 2025 17:44
self, 'break here', lldb.SBFileSpec('main.swift')
)

# dwim-print start by checking whether a member 'A' exists in 'self'.
Copy link

@kastiglione kastiglione Apr 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In this case, dwim-print will fallback to expression evaluation, because A isn't a frame variable.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so this is the same as expression A.shared.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As far as the result is concerned, yes. But the code path I'm specifically checking here is the failing check for a member 'A' in self, which would have triggered a fallback, which will assert in future versions of the test suite.

@adrian-prantl adrian-prantl merged commit c66f74a into swiftlang:swift/release/6.2 Apr 18, 2025
3 checks passed
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.

4 participants