File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -410,7 +410,8 @@ bool GenericSignatureImpl::requiresClass(Type type) {
410410
411411// / Determine the superclass bound on the given dependent type.
412412Type GenericSignatureImpl::getSuperclassBound (Type type) {
413- if (!type->isTypeParameter ()) return nullptr ;
413+ assert (type->isTypeParameter () &&
414+ " Only type parameters can have superclass requirements" );
414415
415416 auto &builder = *getGenericSignatureBuilder ();
416417 auto equivClass =
@@ -456,8 +457,7 @@ GenericSignatureImpl::getConformsTo(Type type) {
456457}
457458
458459bool GenericSignatureImpl::conformsToProtocol (Type type, ProtocolDecl *proto) {
459- // FIXME: Deal with concrete conformances here?
460- if (!type->isTypeParameter ()) return false ;
460+ assert (type->isTypeParameter () && " Expected a type parameter" );
461461
462462 auto &builder = *getGenericSignatureBuilder ();
463463 auto equivClass =
@@ -561,7 +561,7 @@ bool GenericSignatureImpl::isRequirementSatisfied(Requirement requirement) {
561561 // requirement, but it could also be in terms of concrete types if it has
562562 // been substituted/otherwise 'resolved', so we need to handle both.
563563 auto baseType = canFirstType;
564- if (canFirstType ->isTypeParameter ()) {
564+ if (baseType ->isTypeParameter ()) {
565565 auto directSuperclass = getSuperclassBound (baseType);
566566 if (!directSuperclass)
567567 return false ;
You can’t perform that action at this time.
0 commit comments