[ConstraintSystem] Account for unapplied curried self while trying to retrieve function builder type for parameter

This commit is contained in:
Pavel Yaskevich
2019-12-17 01:08:08 -08:00
parent 141c987bb9
commit b868d1cfb7

View File

@@ -6531,6 +6531,10 @@ static Type getFunctionBuilderTypeFor(ConstraintSystem &cs, unsigned paramIdx,
return Type();
auto *choice = selectedOverload->choice.getDecl();
bool skipCurriedSelf = hasAppliedSelf(cs, selectedOverload->choice);
if (choice->hasCurriedSelf() && !skipCurriedSelf)
return Type();
if (!choice->hasParameterList())
return Type();