mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[CS] Replace error type with hole for projected value
Missed this in my previous patch, make sure we replace an error with a hole if necessary.
This commit is contained in:
@@ -801,6 +801,11 @@ private:
|
||||
auto wrapperTy = cs.simplifyType(cs.getType(wrapperTypeExpr));
|
||||
if (auto *projectedVal = wrappedVar->getPropertyWrapperProjectionVar()) {
|
||||
auto projectedTy = computeProjectedValueType(wrappedVar, wrapperTy);
|
||||
// The projected type may have an error, make sure we turn it into a hole
|
||||
// if necessary.
|
||||
ASSERT(!projectedTy->hasUnboundGenericType() &&
|
||||
!projectedTy->hasPlaceholder());
|
||||
projectedTy = cs.replaceInferableTypesWithTypeVars(projectedTy, locator);
|
||||
cs.setType(projectedVal, projectedTy);
|
||||
}
|
||||
if (auto *backing = wrappedVar->getPropertyWrapperBackingProperty())
|
||||
|
||||
Reference in New Issue
Block a user