Skip to content

[borrow-operator] Add initial support for applying _borrow to self when calling a method. #62855

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

Conversation

gottesmm
Copy link
Contributor

@gottesmm gottesmm commented Jan 4, 2023

Example: (_borrow f).callFunction()

This still does not support _borrow for get/set and more general accessors. That change will be coming in a forthcoming commit.

rdar://103888591

…en calling a method.

Example: (_borrow f).callFunction()

This still does not support _borrow for get/set and more general accessors. That
change will be coming in a forthcoming commit.

rdar://103888591
@gottesmm gottesmm requested a review from kavon January 4, 2023 22:33
@gottesmm
Copy link
Contributor Author

gottesmm commented Jan 4, 2023

@swift-ci smoke test

@gottesmm
Copy link
Contributor Author

gottesmm commented Jan 5, 2023

@swift-ci smoke test macOS platform

@gottesmm gottesmm merged commit 25c9a6a into swiftlang:main Jan 5, 2023
@gottesmm gottesmm deleted the pr-9ca4f16fc6bbe7422d4aa05b732475052d170c76 branch January 5, 2023 16:07
Comment on lines +244 to +246
// TODO: This doesn't work now. We should support this potentially for
// _read. But protocols seem to not support _read at this time.
// useQGeneric(_borrow p.q)
Copy link
Member

Choose a reason for hiding this comment

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

This is interesting.

Copy link
Member

@kavon kavon left a comment

Choose a reason for hiding this comment

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

LGTM

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