I have this very simple code:
class ESTime: NSObject {
let hours:Int
let minutes:Int
init(withHours hours:Int, andMinutes minutes:Int)
{
self.hours = hours
self.minutes = minutes
}
}
It doesn't compile. The error message is:
'with' is for the first parameter of an initialiser; did you mean to name this parameter 'hours'?
However, if I change withHours
into anything else like byHours
or fromHours
it compiles ok. Why so? What's wrong with with
?