Ambiguous use of 'textField' in Xcode 26

func textField(
    _ textField: UITextField,
    shouldChangeCharactersIn range: NSRange,
    replacementString string: String
) -> Bool {
    if
        let delegate = delegate,
        let shouldChangeCharactersIn = delegate.textField {
            return shouldChangeCharactersIn(textField, range, string)
    }

    return true
}

This is from an extension

extension TextInput: UITextFieldDelegate, ObservableTextFieldDelegateProtocol {

The delegate is already a UITextFieldDelegate, but when you click on the error, it returns 7 instances of:

"Found this candidate in module 'UIKit' (UIKit.UITextFieldDelegate.textField)"

This doesn't give an error in Xcode 16. Is this an Xcode 26 bug?

Ambiguous use of 'textField' in Xcode 26
 
 
Q