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 f402eb6 commit 5415d6dCopy full SHA for 5415d6d
lib/Sema/TypeCheckAttr.cpp
@@ -2847,6 +2847,8 @@ void AttributeChecker::visitMoveOnlyAttr(MoveOnlyAttr *attr) {
2847
void AttributeChecker::visitConstValAttr(ConstValAttr *attr) {
2848
auto *VD = dyn_cast<VarDecl>(D);
2849
if (VD) {
2850
+ // FIXME: Do not allow 'var' on @const protocol requirements, only allow
2851
+ // 'let' (once that's implemented to be allowed at all).
2852
if (!VD->isLet() && !isa<ProtocolDecl>(D->getDeclContext())) {
2853
diagnose(D->getStartLoc(), diag::attr_only_one_decl_kind,
2854
attr, "let");
0 commit comments