File tree Expand file tree Collapse file tree 2 files changed +26
-1
lines changed Expand file tree Collapse file tree 2 files changed +26
-1
lines changed Original file line number Diff line number Diff line change @@ -1100,7 +1100,8 @@ class LifetimeDependenceChecker {
11001100 }
11011101 switch (accessor->getAccessorKind ()) {
11021102 case AccessorKind::Read:
1103- // An implicit _read accessor is generated when a mutating getter is
1103+ case AccessorKind::Read2:
1104+ // An implicit _read/read accessor is generated when a mutating getter is
11041105 // declared. Emit the same lifetime dependencies as an implicit _modify.
11051106 case AccessorKind::Modify:
11061107 case AccessorKind::Modify2:
Original file line number Diff line number Diff line change 1+ // RUN: %target-typecheck-verify-swift \
2+ // RUN: -enable-experimental-feature LifetimeDependence \
3+ // RUN: -enable-experimental-feature CoroutineAccessors
4+
5+ // REQUIRES: swift_feature_LifetimeDependence
6+ // REQUIRES: swift_feature_CoroutineAccessors
7+
8+ struct NE< T : ~ Copyable & ~ Escapable> : ~ Copyable & ~ Escapable {
9+ @lifetime ( & t)
10+ init(
11+ t: inout T
12+ )
13+ {
14+ }
15+ }
16+
17+ struct S : ~ Copyable & ~ Escapable {
18+ var mutableBytes : NE < S > {
19+ @lifetime ( & self )
20+ mutating get {
21+ return NE ( t: & self )
22+ }
23+ }
24+ }
You can’t perform that action at this time.
0 commit comments