I want to throw an error in the condition in compile time. but #error
throw an error immediately.
这是我的尝试:
var number: Int = 10
if number < 20 {
#error("the number is smaller than 20")
}
但这行不通!
I want to throw an error in the condition in compile time. but #error
throw an error immediately.
这是我的尝试:
var number: Int = 10
if number < 20 {
#error("the number is smaller than 20")
}
但这行不通!