Skip to content

Commit 771ea83

Browse files
committed
Shared parameters do not need a load
1 parent 3585126 commit 771ea83

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/AST/Decl.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3877,7 +3877,7 @@ bool VarDecl::isSettable(const DeclContext *UseDC,
38773877
const DeclRefExpr *base) const {
38783878
// If this is a 'var' decl, then we're settable if we have storage or a
38793879
// setter.
3880-
if (!isLet())
3880+
if (!isLet() && !isShared())
38813881
return ::isSettable(this);
38823882

38833883
// If the decl has a value bound to it but has no PBD, then it is

0 commit comments

Comments
 (0)