Skip to content

Commit cd1656c

Browse files
committed
Exclude properties with type Self
1 parent 384882d commit cd1656c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/Sema/TypeCheckType.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1065,7 +1065,8 @@ static Type diagnoseUnknownType(TypeResolution resolution,
10651065
methodDecl->getDeclContext() == dc->getParentForLookup();
10661066

10671067
if (((!insideClass || !declaringMethod) &&
1068-
!options.is(TypeResolverContext::GenericRequirement)) ||
1068+
!options.is(TypeResolverContext::GenericRequirement) &&
1069+
!options.is(TypeResolverContext::PatternBindingDecl)) ||
10691070
options.is(TypeResolverContext::ExplicitCastExpr)) {
10701071
Type SelfType = nominal->getSelfInterfaceType();
10711072
if (insideClass)

0 commit comments

Comments
 (0)