Skip to content

Commit ef1dfdf

Browse files
committed
[Runtime] Stub out the same-conformance requirement check.
The compiler doesn't generate these yet, and we don't really have a good way to use or test them. For now, ignore them.
1 parent 90afecf commit ef1dfdf

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

stdlib/public/runtime/ProtocolConformance.cpp

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -776,15 +776,21 @@ bool swift::_checkGenericRequirements(
776776
_getTypeByMangledName(req.getMangledTypeName(), substGenericParam);
777777
if (!baseType) return true;
778778

779+
// Check whether it's dynamically castable, which works as a superclass
780+
// check.
779781
if (!swift_dynamicCastMetatype(subjectType, baseType)) return true;
780782

781783
continue;
782784
}
783785

784-
// FIXME: Handle all of the other cases.
785-
default:
786-
return true;
786+
case GenericRequirementKind::SameConformance: {
787+
// FIXME: Implement this check.
788+
continue;
787789
}
790+
}
791+
792+
// Unknown generic requirement kind.
793+
return true;
788794
}
789795

790796
// Success!

0 commit comments

Comments
 (0)