Commit Graph

1 Commits

Author SHA1 Message Date
Slava Pestov
70f038a18b Sema: Avoid an assertion when diagnosing failures in some cases with invalid associated types
The solver's simplifyType() can produce a DependentMemberType with a
concrete or archetype base, if that associated type could not be
resolved during associated type inference.

mapTypeOutOfContext() could assert when given a type that violates
invariants in this manner. Instead, let's directly call subst() here,
providing a conformance lookup function (which will probably end up
returning ErrorTypes).

Fixes https://bugs.swift.org/browse/SR-14672 / rdar://problem/78626943.
2021-06-15 16:17:20 -04:00