Use "TypeBase::hasError()" rather than "is<ErrorType>()" where needed.

In most places where we were checking "is<ErrorType>()", we now mean
"any error occurred". The few exceptions are in associated type
inference, code completion, and expression diagnostics, where we might
still work with partial errors.
This commit is contained in:
Doug Gregor
2016-10-06 17:04:16 -07:00
parent 66e20116f2
commit 50341da32b
37 changed files with 186 additions and 174 deletions

View File

@@ -132,7 +132,7 @@ public:
auto *CE = TheFunction.get<AbstractClosureExpr *>();
if (!CE->getType() || CE->getType()->is<ErrorType>())
if (!CE->getType() || CE->getType()->hasError())
return false;
return CE->getType()->castTo<FunctionType>()->isNoEscape();
}