Skip to content

Commit 81e9c6b

Browse files
committed
AST: Remove unnecessary hasInterfaceType() check
1 parent eb2010e commit 81e9c6b

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
@@ -2833,10 +2833,9 @@ resolveTypeDeclsToNominal(Evaluator &evaluator,
28332833
// Recognize Swift.AnyObject directly.
28342834
if (typealias->getName().is("AnyObject")) {
28352835
// Type version: an empty class-bound existential.
2836-
if (typealias->hasInterfaceType()) {
2837-
if (auto type = typealias->getUnderlyingType())
2838-
if (type->isAnyObject())
2839-
anyObject = true;
2836+
if (auto type = typealias->getUnderlyingType()) {
2837+
if (type->isAnyObject())
2838+
anyObject = true;
28402839
}
28412840
// TypeRepr version: Builtin.AnyObject
28422841
else if (auto *qualIdentTR = dyn_cast_or_null<QualifiedIdentTypeRepr>(

0 commit comments

Comments
 (0)