Normalize the way paren types are stripped in Sema.

This commit is contained in:
Robert Widmann
2016-10-06 16:01:32 -04:00
parent 59aefbc511
commit f59d5cb577
6 changed files with 8 additions and 30 deletions

View File

@@ -2839,13 +2839,7 @@ performMemberLookup(ConstraintKind constraintKind, DeclName memberName,
if (auto fnType =
fnTypeWithSelf->getResult()->getAs<FunctionType>()) {
auto argType = fnType->getInput();
if (auto parenType =
dyn_cast<ParenType>(argType.getPointer())) {
argType = parenType->getUnderlyingType();
}
auto argType = fnType->getInput()->getWithoutParens();
if (argType->isEqual(favoredType))
result.FavoredChoice = result.ViableCandidates.size();
}