Skip to content

Commit 172c200

Browse files
committed
[Diagnostics] NFC: Add a comment about special handling of opaque result types
1 parent b872bdf commit 172c200

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/Sema/ConstraintSystem.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2805,6 +2805,9 @@ static bool diagnoseConflictingGenericArguments(ConstraintSystem &cs,
28052805
if (binding == solution.typeBindings.end())
28062806
return false;
28072807

2808+
// Contextual opaque result type is uniquely identified by
2809+
// declaration it's associated with, so we have to compare
2810+
// declarations instead of using pointer equality on such types.
28082811
if (auto *opaque =
28092812
binding->second->getAs<OpaqueTypeArchetypeType>()) {
28102813
auto *decl = opaque->getDecl();

0 commit comments

Comments
 (0)