Commit Graph

6 Commits

Author SHA1 Message Date
Hamish Knight
5c3f6703a0 Remove diag::type_of_expression_is_ambiguous
This is a diagnostic that is only really emitted as a fallback when
the constraint system isn't able to better diagnose the expression.
It's not particulary helpful for the user, and can be often be
misleading since the underlying issue might not actually be an
ambiguity, and the user may well already have a type annotation. Let's
instead just emit the fallback diagnostic that we emit in all other
cases, asking the user to file a bug.
2025-08-19 17:14:23 +01:00
Slava Pestov
8beaa7b231 Sema: Fix matchExistentialType() handling of ProtocolCompositionType containing ParameterizedProtocolType
This fixes a soundness hole. We can't just match up the primary
associated types of different protocols.
2024-10-22 20:14:44 -04:00
Slava Pestov
2ebef08f7e AST: Generalize findGenericParameterReferences() 2024-09-02 21:42:04 -04:00
Pavel Yaskevich
815699d21a [Diagnostics] Produce a diagnostic for existential mismatch in same-type constraint
Previously this would result in a fallback diagnostic because
type mismatches associated with `ExistentialConstraintType`
locations weren't handled at all.
2024-08-22 16:51:48 -07:00
Slava Pestov
1957bd6065 Sema: Reword diagnostics to say 'without a type annotation' instead of 'without more context' 2023-06-09 17:44:42 -04:00
Slava Pestov
11eb11833f Sema: Fix deep equality matching for parameterized protocol types
Fixes rdar://problem/98356057.
2022-08-09 23:45:39 -04:00