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-2567] @autoclosure cannot be applied to tuples #45172

Open
phausler opened this issue Sep 6, 2016 · 0 comments
Open

[SR-2567] @autoclosure cannot be applied to tuples #45172

phausler opened this issue Sep 6, 2016 · 0 comments
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself feature A feature request or implementation

Comments

@phausler
Copy link
Member

phausler commented Sep 6, 2016

Previous ID SR-2567
Radar None
Original Reporter @phausler
Type Bug
Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Bug, LanguageFeatureRequest
Assignee None
Priority Medium

md5: 26ec68f0c98bd78588f384b8ab365f26

Issue Description:

given the tuple of

(() -> A, () -> B)

I would expect to be able to write:

(@autoclosure () -> A, @autoclosure () -> B)

However it claims this is only applicable to function parameters (which the tuple is a parameter to a function). Which in turn means that I need to explode the application of @autoclosure to all combinations of the tuple. In the two case it is fairly trivial but it could compose down from four functions down to one. Which would be considerably nicer for code-reuse

@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
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself feature A feature request or implementation
Projects
None yet
Development

No branches or pull requests

1 participant