[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.
This commit is contained in:
Doug Gregor
2018-02-01 17:40:17 -08:00
parent 90afecfda8
commit ef1dfdfc42

View File

@@ -776,15 +776,21 @@ bool swift::_checkGenericRequirements(
_getTypeByMangledName(req.getMangledTypeName(), substGenericParam); _getTypeByMangledName(req.getMangledTypeName(), substGenericParam);
if (!baseType) return true; if (!baseType) return true;
// Check whether it's dynamically castable, which works as a superclass
// check.
if (!swift_dynamicCastMetatype(subjectType, baseType)) return true; if (!swift_dynamicCastMetatype(subjectType, baseType)) return true;
continue; continue;
} }
// FIXME: Handle all of the other cases. case GenericRequirementKind::SameConformance: {
default: // FIXME: Implement this check.
return true; continue;
} }
}
// Unknown generic requirement kind.
return true;
} }
// Success! // Success!