Skip to content

Commit 40016d5

Browse files
committed
Don't exclude Self on properties of Value types.
1 parent c317fda commit 40016d5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/Sema/TypeCheckType.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1064,9 +1064,9 @@ static Type diagnoseUnknownType(TypeResolution resolution,
10641064
bool declaringMethod = methodDecl &&
10651065
methodDecl->getDeclContext() == dc->getParentForLookup();
10661066

1067-
if (((!insideClass || !declaringMethod) &&
1068-
!options.is(TypeResolverContext::GenericRequirement) &&
1069-
!options.is(TypeResolverContext::PatternBindingDecl)) ||
1067+
if (((!insideClass || !declaringMethod) && !(insideClass &&
1068+
options.is(TypeResolverContext::PatternBindingDecl)) &&
1069+
!options.is(TypeResolverContext::GenericRequirement)) ||
10701070
options.is(TypeResolverContext::ExplicitCastExpr)) {
10711071
Type SelfType = nominal->getSelfInterfaceType();
10721072
if (insideClass)

0 commit comments

Comments
 (0)