Skip to content

Commit 69269e6

Browse files
committed
[Sema] InitAccessors: Mark init accesor as mutating "self" only for value types
1 parent 4dbaaf3 commit 69269e6

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

lib/Sema/TypeCheckDecl.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1695,6 +1695,7 @@ SelfAccessKindRequest::evaluate(Evaluator &evaluator, FuncDecl *FD) const {
16951695
case AccessorKind::Read:
16961696
break;
16971697

1698+
case AccessorKind::Init:
16981699
case AccessorKind::MutableAddress:
16991700
case AccessorKind::Set:
17001701
case AccessorKind::Modify:
@@ -1710,9 +1711,6 @@ SelfAccessKindRequest::evaluate(Evaluator &evaluator, FuncDecl *FD) const {
17101711

17111712
break;
17121713
}
1713-
1714-
case AccessorKind::Init:
1715-
return SelfAccessKind::Mutating;
17161714
}
17171715
}
17181716

0 commit comments

Comments
 (0)