[Diagnostics] NFC: Add a comment about special handling of opaque result types

This commit is contained in:
Pavel Yaskevich
2020-02-13 00:54:51 -08:00
parent b872bdfca1
commit 172c2003ea

View File

@@ -2805,6 +2805,9 @@ static bool diagnoseConflictingGenericArguments(ConstraintSystem &cs,
if (binding == solution.typeBindings.end())
return false;
// Contextual opaque result type is uniquely identified by
// declaration it's associated with, so we have to compare
// declarations instead of using pointer equality on such types.
if (auto *opaque =
binding->second->getAs<OpaqueTypeArchetypeType>()) {
auto *decl = opaque->getDecl();