Skip to content

Commit 9d17afc

Browse files
committed
handle TypeAlias to Swift.AnyObject
(cherry picked from commit 1122b69)
1 parent 2821497 commit 9d17afc

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

lldb/source/Plugins/TypeSystem/Swift/TypeSystemSwiftTypeRef.cpp

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1789,6 +1789,17 @@ bool TypeSystemSwiftTypeRef::IsPossibleDynamicType(opaque_compiler_type_t type,
17891789
case Node::Kind::ProtocolListWithAnyObject:
17901790
case Node::Kind::DynamicSelf:
17911791
return true;
1792+
case Node::Kind::TypeAlias: {
1793+
if (node->getNumChildren() == 2) {
1794+
auto *module = node->getFirstChild();
1795+
auto *identifier = node->getLastChild();
1796+
return module->getKind() == Node::Kind::Module &&
1797+
identifier->getKind() == Node::Kind::Identifier &&
1798+
module->getText() == "Swift" &&
1799+
identifier->getText() == "AnyObject";
1800+
}
1801+
break;
1802+
}
17921803
case Node::Kind::BuiltinTypeName: {
17931804
if (!node->hasText())
17941805
return false;

0 commit comments

Comments
 (0)