奇思妙想 · 2024年 5月 12日 0

Swift的Void其实就是()

16 次浏览

当你不写函数返回值类型时,其实就暗示编译器函数返回值类型是Void. 而对于Swift内部,Void就是()的别名。

  • public typealias Void = ()