mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[Diagnostics] NFC: Adjust all diagnostics improved/changed by static member refs on protocol metatypes feature
This commit is contained in:
@@ -6881,6 +6881,13 @@ performMemberLookup(ConstraintKind constraintKind, DeclNameRef memberName,
|
||||
if (auto *fnType = resultTy->getAs<FunctionType>())
|
||||
resultTy = fnType->getResult();
|
||||
|
||||
// No reason to suggest that `Void` doesn't conform to some protocol.
|
||||
if (resultTy->isVoid()) {
|
||||
result.addUnviable(candidate,
|
||||
MemberLookupResult::UR_TypeMemberOnInstance);
|
||||
return;
|
||||
}
|
||||
|
||||
// If result is not a concrete type which could conform to the
|
||||
// expected protocol, this method is only viable for diagnostics.
|
||||
if (!(resultTy->is<NominalType>() || resultTy->is<BoundGenericType>()) ||
|
||||
|
||||
Reference in New Issue
Block a user