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

[SR-5385] Allow literals and return values as inout parameters #47959

Open
swift-ci opened this issue Jul 6, 2017 · 4 comments
Open

[SR-5385] Allow literals and return values as inout parameters #47959

swift-ci opened this issue Jul 6, 2017 · 4 comments
Labels
compiler The Swift compiler in itself feature A feature request or implementation improvement

Comments

@swift-ci
Copy link
Collaborator

swift-ci commented Jul 6, 2017

Previous ID SR-5385
Radar None
Original Reporter Reitzig (JIRA User)
Type Improvement
Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Improvement, LanguageFeatureRequest
Assignee None
Priority Medium

md5: 8fee83e49b3b90a1e809d6e8b65b457c

Issue Description:

Currently, it is not possible to have a function like this:

@belkadan
Copy link
Contributor

belkadan commented Jul 6, 2017

This would have to go through the Swift Evolution Process.

@CodaFi
Copy link
Member

CodaFi commented Jul 7, 2017

What does it even mean to have an inout rvalue? You mention you have use cases, but can you give me a more concrete example of why you need this?

@swift-ci
Copy link
Collaborator Author

swift-ci commented Jul 9, 2017

Comment by Raphael (JIRA)

CodaFi (JIRA User) Maybe I wasn't clear. I didn't mean the return value of the function would need to be inout; I have no idea what that would mean. I meant that the return value of a function call should be able to be used as inout parameter of another function call:

@CodaFi
Copy link
Member

CodaFi commented Jul 10, 2017

Yes, those examples are precisely what I was asking about.

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler The Swift compiler in itself feature A feature request or implementation improvement
Projects
None yet
Development

No branches or pull requests

3 participants