Skip to content

Commit

Permalink
[Diagnostics] NFC: Add a comment about special handling of opaque res…
Browse files Browse the repository at this point in the history
…ult types
  • Loading branch information
xedin committed Feb 13, 2020
1 parent b872bdf commit 172c200
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/Sema/ConstraintSystem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 172c200

Please sign in to comment.