mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
conformsToProtocol() is the main way in which we check whether a given type conforms to a given protocol. Extend it to check conditional requirements by default, so that an unmodified caller will get the "does not conform" result (with diagnostics when a location is present) rather than simply ignoring the conditional requirements. Some callers take responsibility for conditional requirements, e.g., to push them into the constraint system. Allow those callers to opt out of this checking, and do so wherever appropriate. Fixes rdar://problem/35518088, where we were ignoring the conditional requirements needed to verify that Equatable synthesis could be performed.
13 KiB
13 KiB