Skip to content

Commit a1a07d8

Browse files
committed
AST: Remove unnecessary hasInterfaceType() check
1 parent 4308cab commit a1a07d8

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

lib/AST/NameLookup.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2830,10 +2830,9 @@ resolveTypeDeclsToNominal(Evaluator &evaluator,
28302830
// Recognize Swift.AnyObject directly.
28312831
if (typealias->getName().is("AnyObject")) {
28322832
// Type version: an empty class-bound existential.
2833-
if (typealias->hasInterfaceType()) {
2834-
if (auto type = typealias->getUnderlyingType())
2835-
if (type->isAnyObject())
2836-
anyObject = true;
2833+
if (auto type = typealias->getUnderlyingType()) {
2834+
if (type->isAnyObject())
2835+
anyObject = true;
28372836
}
28382837
// TypeRepr version: Builtin.AnyObject
28392838
else if (auto *qualIdentTR = dyn_cast_or_null<QualifiedIdentTypeRepr>(

0 commit comments

Comments
 (0)