-
Notifications
You must be signed in to change notification settings - Fork 10.7k
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-2316 |
| Radar | None |
| Original Reporter | dgrove-oss (JIRA User) |
| Type | Bug |
| Status | Closed |
| Resolution | Duplicate |
Attachment: Download
Additional Detail from JIRA
| Votes | 0 |
| Component/s | Compiler |
| Labels | Bug |
| Assignee | @slavapestov |
| Priority | Medium |
md5: baffa86c07d4e4507700b040d298e309
duplicates:
is duplicated by:
- SR-2355 Typealias and escaping
- SR-2493 Escaping and Type-aliases don't work together
- SR-2522 Function attribute @escaping does not apply to function type aliases
Issue Description:
Test case attached. When cleaning up the Dispatch overlay for Linux I observed that a typealias for a closure type did not pick up the default @NoEscape annotation. As a result, the attached test case does not compile (but should).
dgrove@dgrove-vb-swift:~/swift/tests$ swiftc NoEscape.swift
NoEscape.swift:7:4: error: closure use of non-escaping parameter 'block' may allow it to escape
block(y)
^
NoEscape.swift:4:10: note: parameter 'block' is implicitly non-escaping
func foo(block:(Int)->Void) {
^
@escaping Reactions are currently unavailable
Metadata
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