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-2522] Function attribute @escaping does not apply to function type aliases #45127

Closed
swift-ci opened this issue Aug 30, 2016 · 0 comments
Closed

Comments

@swift-ci
Copy link
Collaborator

@swift-ci swift-ci commented Aug 30, 2016

Previous ID SR-2522
Radar None
Original Reporter Andreas Grosam (JIRA User)
Type Bug
Status Resolved
Resolution Duplicate
Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Bug
Assignee None
Priority Medium

md5: b7d39839f9b0f82a87ae2c84cf3d9bbf

duplicates:

Issue Description:

A typealias name which declares a function type used as a parameter type in another function modified with attribute `@escaping` yields a compiler error, which IMHO is not correct.

The following code demonstrates the issue:

{code: code:title=Swift|linenumbers=true|firstline=000}
internal struct Foo<T> {
typealias ClosureType = (T) -> ()

func foo(f: ClosureType) {}
func foo2(f: @escaping ClosureType) {} // error: @escaping attribute only applies to function types
func foo3(f: @escaping (T)-> ()) {}
}

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant