You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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: