Skip to content
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

Sema: Extend _unsafeInheritExecutor_ hack to Clock.measure() #80333

Merged

Conversation

tshortli
Copy link
Contributor

Fixes the bug in swift::introduceUnsafeInheritExecutorReplacements() that prevented the hack from working with Clock.measure(). It isn't sufficient to just check whether the nominal for the type base of a qualified lookup belongs to the Concurrency module because that type may reference multiple types. Instead, check all of the directly referenced types to match the behavior of qualified lookup.

Resolves rdar://132581483.

Fixes the bug in `swift::introduceUnsafeInheritExecutorReplacements()` that
prevented the hack from working with `Clock.measure()`. It isn't sufficient to
just check whether the nominal for the type base of a qualified lookup belongs
to the Concurrency module because that type may reference multiple types.
Instead, check all of the directly referenced types to match the behavior of
qualified lookup.

Resolves rdar://132581483.
@tshortli
Copy link
Contributor Author

@swift-ci please test

@tshortli tshortli marked this pull request as ready for review March 28, 2025 14:28
@tshortli tshortli requested a review from DougGregor March 28, 2025 14:28
@tshortli
Copy link
Contributor Author

@DougGregor does this look reasonable to you?

Copy link
Member

@DougGregor DougGregor left a comment

Choose a reason for hiding this comment

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

Yes, that's a good fix. Thank you!

@tshortli tshortli merged commit 2fb76a4 into swiftlang:main Mar 30, 2025
5 checks passed
@tshortli tshortli deleted the clock-measure-unsafe-inherit-executor branch March 30, 2025 23:14
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.

2 participants