Runtime: Finish removing the 'extra argument' notion

This commit is contained in:
Slava Pestov
2023-03-02 17:50:04 -05:00
parent 6df72d606e
commit 32caa17b11
9 changed files with 128 additions and 150 deletions

View File

@@ -1291,6 +1291,9 @@ llvm::Optional<TypeLookupError> swift::_checkGenericRequirements(
if (!req.hasKnownKind())
return TypeLookupError("unknown kind");
if (req.getFlags().isPackRequirement())
return TypeLookupError("Packs not supported here yet");
// Resolve the subject generic parameter.
auto result = swift_getTypeByMangledName(
MetadataState::Abstract, req.getParam(), extraArguments.data(),
@@ -1330,8 +1333,6 @@ llvm::Optional<TypeLookupError> swift::_checkGenericRequirements(
return *result.getError();
auto otherType = result.getType().getMetadata();
assert(!req.getFlags().hasExtraArgument());
// Check that the types are equivalent.
if (subjectType != otherType)
return TYPE_LOOKUP_ERROR_FMT(