Why it is allowed to redeclare computed properties of Swift’s built-in types in an extension, while it is not allowed to redeclare computed properties of my custom types?
struct X {
var isEmpty: Bool { true }
}
extension X {
var isEmpty: Bool { true } // error: invalid redeclaration of 'isEmpty'
}
extension String {
var isEmpty: Bool { true } // allowed
}