mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user