I've a small extension for the Date
type with some simple helper methods like
extension Date
{
func dateByAdding(components: DateComponents) -> Date?
{
return Calendar.current.date(byAdding: components, to: self)
}
Now there's one class where Xcode 13.0 beta 2 keeps telling me Type 'Date' has no member 'dateByAdding'
while in another class the extension works as expected.
All files are 100% swift and all relevant files have a Target Membership of the same target.
I've tried the usual things like removing the Derived Data folder, but without success. Any ideas what could cause this?
Edit
The following screenshot shows the error:
It's just the following line of code:
let date = Date().dateByAdding(components: DateComponents(month: -6))