SILGen: Pseudogeneric partial applications do not produce pseudogeneric results.

partial_apply always fully applies the generic environment, so the result is not generic at all. Fixes rdar://problem/41474371 | SR-8107.
This commit is contained in:
Joe Groff
2018-06-26 20:33:04 -07:00
parent ee8abd4ad3
commit 55706bfd44
5 changed files with 24 additions and 8 deletions

View File

@@ -62,8 +62,9 @@ SILType SILBuilder::getPartialApplyResultType(SILType origTy, unsigned argCount,
auto params = FTI->getParameters();
auto newParams = params.slice(0, params.size() - argCount);
auto extInfo = FTI->getExtInfo().withRepresentation(
SILFunctionType::Representation::Thick);
auto extInfo = FTI->getExtInfo()
.withRepresentation(SILFunctionType::Representation::Thick)
.withIsPseudogeneric(false);
// If the original method has an @unowned_inner_pointer return, the partial
// application thunk will lifetime-extend 'self' for us, converting the