mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[Diagnostics] NFC: Add a comment about special handling of opaque result types
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user