Skip to content

Commit 4597cc3

Browse files
committed
AST: Change condition to assert in TypeAliasDecl::setUnderlyingType()
1 parent 839e8ec commit 4597cc3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/AST/Decl.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5423,8 +5423,8 @@ Type TypeAliasDecl::getUnderlyingType() const {
54235423
void TypeAliasDecl::setUnderlyingType(Type underlying) {
54245424
// lldb creates global typealiases containing archetypes
54255425
// sometimes...
5426-
if (underlying->hasArchetype() && isGenericContext())
5427-
underlying = underlying->mapTypeOutOfContext();
5426+
assert(!underlying->hasArchetype() || !isGenericContext());
5427+
54285428
getASTContext().evaluator.cacheOutput(
54295429
StructuralTypeRequest{const_cast<TypeAliasDecl *>(this)},
54305430
std::move(underlying));

0 commit comments

Comments
 (0)