Skip to content

Commit b0299f7

Browse files
committed
[CSSimplify] NFC: Adjust comment about matching dependent types with invalid base
1 parent b898eaf commit b0299f7

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

lib/Sema/CSSimplify.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2869,9 +2869,10 @@ ConstraintSystem::matchTypes(Type type1, Type type2, ConstraintKind kind,
28692869
auto desugar2 = type2->getDesugaredType();
28702870

28712871
// If both sides are dependent members without type variables, it's
2872-
// possible that base type is incorrect e.g. `U.Element` where `U`
2873-
// is a generic parameter, so checking equality here would lead to
2874-
// incorrect behavior, let's defer it until later proper check.
2872+
// possible that base type is incorrect e.g. `Foo.Element` where `Foo`
2873+
// is a concrete type substituted for generic generic parameter,
2874+
// so checking equality here would lead to incorrect behavior,
2875+
// let's defer it until later proper check.
28752876
if (!(desugar1->is<DependentMemberType>() &&
28762877
desugar2->is<DependentMemberType>())) {
28772878
// If the types are obviously equivalent, we're done.

0 commit comments

Comments
 (0)