mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
SILGen: Avoid crashing for invalid conformances.
Force resolution of value witnesses and check the conformance for validity before proceeding to witness table emission in SILGen to avoid crashing because of unexpected errors in the AST. Resolves rdar://123027739
This commit is contained in:
@@ -1401,9 +1401,7 @@ ResolveImplicitMemberRequest::evaluate(Evaluator &evaluator,
|
||||
// FIXME: This should be more fine-grained to avoid having to check
|
||||
// for a cycle here.
|
||||
if (!evaluator.hasActiveRequest(ResolveValueWitnessesRequest{conformance})) {
|
||||
evaluateOrDefault(evaluator,
|
||||
ResolveValueWitnessesRequest{conformance},
|
||||
evaluator::SideEffect());
|
||||
conformance->resolveValueWitnesses();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user