Skip to content

Commit de57a74

Browse files
committed
Sema: Map raw type into context before checking conditional conformance
1 parent 485135b commit de57a74

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/Sema/TypeCheckProtocol.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5674,6 +5674,9 @@ void swift::diagnoseConformanceFailure(Type T,
56745674

56755675
// If the reason is that the raw type does not conform to
56765676
// Equatable, say so.
5677+
//
5678+
// Map it into context since we want to check conditional requirements.
5679+
rawType = enumDecl->mapTypeIntoContext(rawType);
56775680
if (!TypeChecker::conformsToKnownProtocol(
56785681
rawType, KnownProtocolKind::Equatable, DC->getParentModule())) {
56795682
SourceLoc loc = enumDecl->getInherited().getStartLoc();

0 commit comments

Comments
 (0)