Skip to content

Commit 02f5e47

Browse files
committed
[Sema] Resolve @_implements protocols using the generic requirement
type resolver context.
1 parent f368b77 commit 02f5e47

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/Sema/TypeCheckAttr.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3000,8 +3000,10 @@ void AttributeChecker::visitImplementsAttr(ImplementsAttr *attr) {
30003000

30013001
Type T = attr->getProtocolType();
30023002
if (!T && attr->getProtocolTypeRepr()) {
3003+
auto context = TypeResolverContext::GenericRequirement;
30033004
T = TypeResolution::resolveContextualType(attr->getProtocolTypeRepr(), DC,
3004-
None, /*unboundTyOpener*/ nullptr,
3005+
TypeResolutionOptions(context),
3006+
/*unboundTyOpener*/ nullptr,
30053007
/*placeholderHandler*/ nullptr);
30063008
}
30073009

0 commit comments

Comments
 (0)