【发布时间】:2015-12-22 15:25:19
【问题描述】:
例子:
@noreturn func setOnlyPropertyGetterError(__function__: String) {
fatalError("\(__function__) is set-only")
}
var property: Property {
get {setOnlyPropertyGetterError(__FUNCTION__)}
set {//useful work}
}
我们可以避免通过__FUNCTION__吗?
【问题讨论】:
标签: swift macros fatal-error