[cs] use anchor instead of locator, etc

This commit is contained in:
Suyash Srijan
2019-01-25 21:36:07 +00:00
parent 5b7fd8cc97
commit 6a0a1dec05
6 changed files with 14 additions and 8 deletions

View File

@@ -591,9 +591,10 @@ bool MissingOptionalUnwrapFailure::diagnoseAsError() {
auto *tryExpr = dyn_cast<OptionalTryExpr>(unwrapped);
if (!tryExpr) {
auto resolvedBaseTy = BaseType ? resolveType(BaseType) : BaseType;
auto resolvedBaseTy =
resolveType(BaseType)->reconstituteSugar(/*recursive=*/true);
auto resolvedUnwrappedTy =
UnwrappedType ? resolveType(UnwrappedType) : UnwrappedType;
resolveType(UnwrappedType)->reconstituteSugar(/*recursive=*/true);
return diagnoseUnwrap(getConstraintSystem(), unwrapped, resolvedBaseTy,
resolvedUnwrappedTy);
}