【发布时间】:2016-04-10 02:42:21
【问题描述】:
在test1()中,可以返回test()成功返回的Void。但是在 test2() 中,会抛出错误。为什么?
//: Playground - noun: a place where people can play
import UIKit
import AVFoundation
func test()->Void{
print("Hello")
}
func test1(){//print Hello
return test()
}
func test2(){// throw error
return Void
}
【问题讨论】:
标签: swift function return void