mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
- If P is declared to inherit from Q and Q has an associated type named U, then isValidTypeInContext() returns true for a type 'T.U' where 'T' is a generic parameter conforming to P, and 'U' is the unresolved DependentMemberType, and the type 'T.U' will simplify to the term 'T.[P:U]'. - However, if completion failed while building the rewrite system for P's requirement signature, then the requirement signature for P won't have a rule [P].[Q] => [P]. As a result, getTypeForTerm() will fail when given 'T.[P:U]', because the property map entry for 'T' will not contain a conformance to Q. Work around this by manually adding protocol inheritance rules when building a signature from a protocol whose requirement signature failed to compute. This was triggered by the test case I added in the previous commit to test/Generics/non_confluent.swift.
16 KiB
16 KiB