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
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)-> ()) {} }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Additional Detail from JIRA
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)-> ()) {}
}
The text was updated successfully, but these errors were encountered: