Merge pull request #64131 from DougGregor/macro-generic-interface-type

Make the interface type of a generic macro into a GenericFunctionType.
This commit is contained in:
swift-ci
2023-03-06 01:54:08 -08:00
committed by GitHub
6 changed files with 27 additions and 12 deletions

View File

@@ -1676,14 +1676,13 @@ ConstraintSystem::getTypeOfReference(ValueDecl *value,
// Open any the generic types.
OpenedTypeMap replacements;
openGeneric(macro->getParentModule(), macro->getGenericSignature(),
locator, replacements);
Type openedType = openFunctionType(
macroType->castTo<AnyFunctionType>(), locator, replacements,
macro->getDeclContext());
// If we opened up any type variables, record the replacements.
recordOpenedTypes(locator, replacements);
Type openedType = openType(macroType, replacements);
// FIXME: Should we use replaceParamErrorTypeByPlaceholder() here?
return { openedType, openedType, openedType, openedType };