[NFC] Use consistent naming scheme for predicate methods. (#33265)

bool throws() -> isThrowing(), bool async() -> isAsync()
This commit is contained in:
Varun Gandhi
2020-08-03 16:37:29 -07:00
committed by GitHub
parent ab043451a7
commit 3882beb85d
35 changed files with 87 additions and 91 deletions

View File

@@ -494,12 +494,12 @@ swift::classifyDynamicCast(ModuleDecl *M,
// An async function cannot be cast to a non-async function and
// vice-versa.
if (sourceFunction->async() != targetFunction->async())
if (sourceFunction->isAsync() != targetFunction->isAsync())
return DynamicCastFeasibility::WillFail;
// A non-throwing source function can be cast to a throwing target type,
// but not vice versa.
if (sourceFunction->throws() && !targetFunction->throws())
if (sourceFunction->isThrowing() && !targetFunction->isThrowing())
return DynamicCastFeasibility::WillFail;
// The cast can't change the representation at runtime.