Commit cf1a946
committed
Give ~Escapable _read accessors with borrow scope borrowed ownership
This applies to all _read accessors whose result depends on a borrow
of self. In this case, the coroutine defines the borrow scope, and the
~Escapable property value can only be used within that scope. This
makes it impossible to synthesize a getter. Returning the ~Escpable
value from the getter would always escape the coroutine.1 parent ec85589 commit cf1a946
File tree
2 files changed
+24
-0
lines changed- lib/Sema
- test/SILGen
2 files changed
+24
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
869 | 869 | | |
870 | 870 | | |
871 | 871 | | |
| 872 | + | |
| 873 | + | |
| 874 | + | |
| 875 | + | |
| 876 | + | |
| 877 | + | |
| 878 | + | |
| 879 | + | |
| 880 | + | |
| 881 | + | |
| 882 | + | |
| 883 | + | |
872 | 884 | | |
873 | 885 | | |
874 | 886 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
0 commit comments