Skip to content

Commit 836c336

Browse files
committed
Lifetime test: implicit subscript getter depenency, implicit _modify
1 parent 52b990a commit 836c336

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

test/Sema/lifetime_depend_infer.swift

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -318,6 +318,16 @@ struct Accessors {
318318
yield &ne
319319
}
320320
}
321+
322+
// Synthesized _modify...
323+
subscript(_ index: Int) -> NEImmortal {
324+
get { // OK
325+
NEImmortal()
326+
}
327+
328+
set { // OK (no dependency)
329+
}
330+
}
321331
}
322332

323333
struct TrivialAccessors {

0 commit comments

Comments
 (0)