Skip to content

Commit ada481f

Browse files
committed
Sema: Make sure the protocol is validated before conformance checking
1 parent b77374a commit ada481f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/Sema/TypeCheckProtocol.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2198,6 +2198,8 @@ namespace {
21982198
conformance->setState(ProtocolConformanceState::Checking);
21992199
SWIFT_DEFER { conformance->setState(ProtocolConformanceState::Complete); };
22002200

2201+
TC.validateDecl(Proto);
2202+
22012203
// If the protocol itself is invalid, there's nothing we can do.
22022204
if (Proto->isInvalid()) {
22032205
conformance->setInvalid();

0 commit comments

Comments
 (0)