-
Notifications
You must be signed in to change notification settings - Fork 10.6k
Open
Labels
@autoclosureFeature → attributes: the @autoclosure type attributeFeature → attributes: the @autoclosure type attributeattributesFeature: Declaration and type attributesFeature: Declaration and type attributescompilerThe Swift compiler itselfThe Swift compiler itselftuple typesFeature → types: Tuple typesFeature → types: Tuple typestuplesFeature: tuplesFeature: tuplestypesFeature: typesFeature: types
Description
| 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
Metadata
Metadata
Assignees
Labels
@autoclosureFeature → attributes: the @autoclosure type attributeFeature → attributes: the @autoclosure type attributeattributesFeature: Declaration and type attributesFeature: Declaration and type attributescompilerThe Swift compiler itselfThe Swift compiler itselftuple typesFeature → types: Tuple typesFeature → types: Tuple typestuplesFeature: tuplesFeature: tuplestypesFeature: typesFeature: types