Skip to content

[4.0jun23] [Type checker] Always record used conformances in the source file. #10641

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions lib/Sema/TypeCheckProtocol.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5523,9 +5523,9 @@ void TypeChecker::markConformanceUsed(ProtocolConformanceRef conformance,
auto normalConformance =
conformance.getConcrete()->getRootNormalConformance();

if (normalConformance->isComplete()) return;

UsedConformances.insert(normalConformance);
// Make sure that the type checker completes this conformance.
if (normalConformance->isIncomplete())
UsedConformances.insert(normalConformance);

// Record the usage of this conformance in the enclosing source
// file.
Expand Down