mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[AST] rename some isXXX methods to getAsXXX
There's a group of methods in `DeclContext` with names that start with *is*, such as `isClassOrClassExtensionContext()`. These names suggests a boolean return value, while the methods actually return a type declaration. This patch replaces the *is* prefix with *getAs* to better reflect their interface.
This commit is contained in:
@@ -61,7 +61,7 @@ static Type findBaseTypeForReplacingArchetype(const ValueDecl *VD, const Type Ty
|
||||
|
||||
// Find the nominal type decl related to VD.
|
||||
NominalTypeDecl *NTD = VD->getDeclContext()->
|
||||
isNominalTypeOrNominalTypeExtensionContext();
|
||||
getAsNominalTypeOrNominalTypeExtensionContext();
|
||||
if (!NTD)
|
||||
return Type();
|
||||
Type Result;
|
||||
|
||||
Reference in New Issue
Block a user