mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
When checking whether a particular protocol conformance satisfies all of the protocol's requirements, we were suppressing substitution failures. In some cases, this would mean that we marked a conformance "invalid" without ever emitting a diagnostic, which would lead to downstream crashes. Instead, treat substitution failures somewhat more lazily. If we encounter one while performing the checking, put the conformance into a "delayed" list rather than failing immediately. Teach the top-level type checking loop to re-check these conformances, emitting a diagnostic if they fail the second time around. Fixes rdar://problem/35082483 and likely other issues that slipped through the type checker or blew up in unpredictable ways.
48 KiB
48 KiB