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