mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +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:
@@ -784,7 +784,7 @@ ParserResult<Pattern> Parser::parsePattern() {
|
||||
}
|
||||
|
||||
case tok::code_complete:
|
||||
if (!CurDeclContext->isNominalTypeOrNominalTypeExtensionContext()) {
|
||||
if (!CurDeclContext->getAsNominalTypeOrNominalTypeExtensionContext()) {
|
||||
// This cannot be an overridden property, so just eat the token. We cannot
|
||||
// code complete anything here -- we expect an identifier.
|
||||
consumeToken(tok::code_complete);
|
||||
|
||||
Reference in New Issue
Block a user