Skip to content

Commit 753dcc2

Browse files
authored
Merge pull request #10641 from DougGregor/record-conformance-in-source-file-4.0jun23
[4.0jun23] [Type checker] Always record used conformances in the source file.
2 parents e5e40e5 + 5899928 commit 753dcc2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/Sema/TypeCheckProtocol.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5523,9 +5523,9 @@ void TypeChecker::markConformanceUsed(ProtocolConformanceRef conformance,
55235523
auto normalConformance =
55245524
conformance.getConcrete()->getRootNormalConformance();
55255525

5526-
if (normalConformance->isComplete()) return;
5527-
5528-
UsedConformances.insert(normalConformance);
5526+
// Make sure that the type checker completes this conformance.
5527+
if (normalConformance->isIncomplete())
5528+
UsedConformances.insert(normalConformance);
55295529

55305530
// Record the usage of this conformance in the enclosing source
55315531
// file.

0 commit comments

Comments
 (0)