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
It would be nice if we could put a type annotation on a function declaration, as we can can already for constants, variables, properties, structures and classes. The major motivation for this feature is to declare functions in a protocol whose signatures should match specific function type by typealias, where the functions may be passed later per reference.
Additional Detail from JIRA
md5: 3996b865d54561ed74e814cb8778d233
Issue Description:
It would be nice if we could put a type annotation on a function declaration, as we can can already for constants, variables, properties, structures and classes. The major motivation for this feature is to declare functions in a protocol whose signatures should match specific function type by typealias, where the functions may be passed later per reference.
As pointed out by rraphael in Make func type explicit (Stack Overflow) - the grammar of a function declaration doesn't allow this currently.
The text was updated successfully, but these errors were encountered: