-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[Sema] Permit dot reference with isolation change without call #79575
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] Permit dot reference with isolation change without call #79575
Conversation
@swift-ci Please test |
171a0c9
to
51941e9
Compare
@swift-ci Please test |
@swift-ci Please test |
@NuriAmari this is actually already fixed on main. https://godbolt.org/z/GjsdWv8bx. |
This is now something that is the province of region isolation. I am not sure if we actually need to muck with Sema. That being said, it would be great to transition this PR to just be for adding tests. More tests are always good. |
I'll update |
78b7d5c
to
03321b6
Compare
A dot-reference of a method defined on `Self` (as well as through `self`) should be permitted to be made in a different actor isolation than the referenced function's actor isolation if a call is not yet made, as the DeclRefExpr can store the isolation of the referenced decl. That said, we currently can only express that known isolation with global actor annotations until the language adopts closure isolation control. This is fixed on main so just recomming for the tests
03321b6
to
939aaa9
Compare
Updated to just include the tests. @gottesmm, better this? |
@swift-ci please test |
LGTM. Thanks! |
A dot-reference of a method defined on
Self
(as well as throughself
) should be permitted to be made in a different actor isolation than the referenced function's actor isolation if a call is not yet made, as the DeclRefExpr can store the isolation of the referenced decl. That said, we currently can only express that known isolation with global actor annotations until the language adopts closure isolation control.Resolves (for global actors) #76453