-
Notifications
You must be signed in to change notification settings - Fork 10.6k
Closed
Labels
bugA deviation from expected or documented behavior. Also: expected but undesirable behavior.A deviation from expected or documented behavior. Also: expected but undesirable behavior.compilerThe Swift compiler itselfThe Swift compiler itself
Description
| Previous ID | SR-2688 |
| Radar | None |
| Original Reporter | paul.eipper (JIRA User) |
| Type | Bug |
| Status | Resolved |
| Resolution | Done |
Environment
Xcode 8 (8A218a)
Apple Swift version 3.0 (swiftlang-800.0.46.2 clang-800.0.38)
Build Target iOS SDK 10
Additional Detail from JIRA
| Votes | 6 |
| Component/s | Compiler |
| Labels | Bug |
| Assignee | @theblixguy |
| Priority | Medium |
md5: 9f37a359be81b189770a77e2934b7c3e
duplicates:
- SR-3824 Autoclosure attribute fails with type aliased function
Issue Description:
This will not work in Swift 3:
typealias ViewClosure = () -> UIView
class ViewController: UIViewController {
func viewMaker(closure: @autoclosure ViewClosure) {
self.view = closure()
}
}Error:
@autoclosure ViewClosure: @autoclosure attribute only applies to function typesMetadata
Metadata
Assignees
Labels
bugA deviation from expected or documented behavior. Also: expected but undesirable behavior.A deviation from expected or documented behavior. Also: expected but undesirable behavior.compilerThe Swift compiler itselfThe Swift compiler itself