Open Alc-Alc opened 1 month ago
So this was an issue with my understanding, the only "issue" I would like to point out is this.
If you use the former (
(Void) -> Void
) as atypealias
, Swift warns. I am assuming things changed on a newer version but the docs were not updated?
You can close the issue if you want. Thanks again.
Location
https://docs.swift.org/swift-book/documentation/the-swift-programming-language/types#Function-Type
Description
If you use the former (
(Void) -> Void
) as atypealias
, Swift warns. I am assuming things changed on a newer version but the docs were not updated?But in the snippet that follows, all are
true
, meaning the types are same.PS: All the quotes are taken from the aforementioned link and code snippets were run on Swift 5.10.
Correction
There is a chance I am just misunderstanding things, but I feel this part could be improved by not referring to a type (
(Void) -> Void
) that emits a warning and preferably explaining more on how they differ as the code snippet I have shown tells me (again, it could very well be a misunderstanding 🙂) that they do not differ.Edit: I have asked over at https://forums.swift.org/t/understanding-function-types/73349. I will close the issue if there is something wrong in my understanding, thanks and apologies 🙂