Skip to content

Commit 2319b8d

Browse files
committed
[AST] Type erase covariant root type params to dependent upper bound
There are two functions that type-erase occurrences of covariant 'Self'-rooted type parameters to their most specific bounds. Update the second function to erase to the dependent upper bound.
1 parent 17b8287 commit 2319b8d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/AST/Type.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -587,7 +587,7 @@ Type TypeBase::typeEraseOpenedArchetypesWithRoot(
587587
erasedTy = root->getExistentialType();
588588
} else {
589589
erasedTy =
590-
sig->getNonDependentUpperBounds(archetype->getInterfaceType());
590+
sig->getDependentUpperBounds(archetype->getInterfaceType());
591591
}
592592

593593
if (metatypeDepth) {

0 commit comments

Comments
 (0)