[CSFix] Diagnose extraneous force unwraps in ambiguous context

This commit is contained in:
Pavel Yaskevich
2023-02-22 11:27:31 -08:00
committed by Pavel Yaskevich
parent 22893a0500
commit bb1da5e599
3 changed files with 16 additions and 1 deletions

View File

@@ -121,6 +121,7 @@ do {
} // expected-error {{expected expression after operator}}
_ = /x/??/x/ // expected-error {{'/' is not a postfix unary operator}}
// expected-error@-1 2 {{cannot use optional chaining on non-optional value of type 'Regex<Substring>'}}
_ = /x/ ... /y/ // expected-error {{referencing operator function '...' on 'Comparable' requires that 'Regex<Substring>' conform to 'Comparable'}}