We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dcd7469 commit feb8684Copy full SHA for feb8684
lib/Sema/CSDiagnostics.cpp
@@ -7212,6 +7212,11 @@ bool InvalidMemberRefOnProtocolMetatype::diagnoseAsError() {
7212
emitDiagnostic(diag::type_does_not_conform_in_member_ref_on_protocol_type,
7213
member->getDescriptiveKind(), member->getName(),
7214
MetatypeType::get(protocolTy), resultTy);
7215
+
7216
+ if (resultTy->is<FunctionType>() || resultTy->is<TupleType>() ||
7217
+ resultTy->isExistentialType() || resultTy->is<AnyMetatypeType>())
7218
+ emitDiagnostic(diag::only_concrete_types_conform_to_protocols);
7219
7220
emitDiagnosticAt(member, diag::decl_declared_here, member->getName());
7221
return true;
7222
}
0 commit comments