[CSFix] Use fully qualified locators for requirement failures

Would help to diagnose failures where requirement comes from
contextual type, also simplifies logic around requirement fixes
to some degree.
This commit is contained in:
Pavel Yaskevich
2019-02-18 12:03:46 -08:00
parent b009bf6154
commit 70b5bce791
3 changed files with 33 additions and 31 deletions

View File

@@ -86,7 +86,9 @@ Expr *FailureDiagnostic::findParentExpr(Expr *subExpr) const {
}
Type RequirementFailure::getOwnerType() const {
return getType(getAnchor())->getInOutObjectType()->getMetatypeInstanceType();
return getType(getRawAnchor())
->getInOutObjectType()
->getMetatypeInstanceType();
}
const GenericContext *RequirementFailure::getGenericContext() const {