Skip to content

Commit

Permalink
Don't exclude Self on properties of Value types.
Browse files Browse the repository at this point in the history
  • Loading branch information
johnno1962 committed Mar 23, 2019
1 parent c317fda commit 40016d5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/Sema/TypeCheckType.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1064,9 +1064,9 @@ static Type diagnoseUnknownType(TypeResolution resolution,
bool declaringMethod = methodDecl &&
methodDecl->getDeclContext() == dc->getParentForLookup();

if (((!insideClass || !declaringMethod) &&
!options.is(TypeResolverContext::GenericRequirement) &&
!options.is(TypeResolverContext::PatternBindingDecl)) ||
if (((!insideClass || !declaringMethod) && !(insideClass &&
options.is(TypeResolverContext::PatternBindingDecl)) &&
!options.is(TypeResolverContext::GenericRequirement)) ||
options.is(TypeResolverContext::ExplicitCastExpr)) {
Type SelfType = nominal->getSelfInterfaceType();
if (insideClass)
Expand Down

0 comments on commit 40016d5

Please sign in to comment.