Commit d051b62
committed
Ensure that we do not turn rvalues into lvalues
The computation that determined whether an access to a `let` instance
property within a constructor should be an initialization conflated the
cases of "we don't have a base expression" and "the base expression is
not something that could be `self`", and incorrectly identified rvalue
bases as being "initializable". Make the interface properly separate
out these cases, so we don't turn an lvalue into an rvalue access.
Fixes rdar://128661833.1 parent 2c0914c commit d051b62
File tree
3 files changed
+50
-22
lines changed- include/swift/AST
- lib/AST
- test/decl/init
3 files changed
+50
-22
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5760 | 5760 | | |
5761 | 5761 | | |
5762 | 5762 | | |
5763 | | - | |
5764 | | - | |
5765 | | - | |
| 5763 | + | |
| 5764 | + | |
5766 | 5765 | | |
5767 | 5766 | | |
5768 | 5767 | | |
| |||
5773 | 5772 | | |
5774 | 5773 | | |
5775 | 5774 | | |
5776 | | - | |
5777 | | - | |
| 5775 | + | |
| 5776 | + | |
| 5777 | + | |
5778 | 5778 | | |
5779 | 5779 | | |
5780 | 5780 | | |
| |||
5784 | 5784 | | |
5785 | 5785 | | |
5786 | 5786 | | |
5787 | | - | |
| 5787 | + | |
5788 | 5788 | | |
5789 | 5789 | | |
5790 | 5790 | | |
| |||
5793 | 5793 | | |
5794 | 5794 | | |
5795 | 5795 | | |
5796 | | - | |
5797 | | - | |
5798 | | - | |
| 5796 | + | |
| 5797 | + | |
5799 | 5798 | | |
5800 | 5799 | | |
5801 | 5800 | | |
| |||
6117 | 6116 | | |
6118 | 6117 | | |
6119 | 6118 | | |
6120 | | - | |
6121 | | - | |
| 6119 | + | |
| 6120 | + | |
| 6121 | + | |
6122 | 6122 | | |
6123 | 6123 | | |
6124 | 6124 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3093 | 3093 | | |
3094 | 3094 | | |
3095 | 3095 | | |
3096 | | - | |
| 3096 | + | |
3097 | 3097 | | |
3098 | 3098 | | |
3099 | 3099 | | |
| |||
3109 | 3109 | | |
3110 | 3110 | | |
3111 | 3111 | | |
3112 | | - | |
3113 | | - | |
| 3112 | + | |
| 3113 | + | |
| 3114 | + | |
| 3115 | + | |
3114 | 3116 | | |
3115 | 3117 | | |
3116 | 3118 | | |
| |||
7312 | 7314 | | |
7313 | 7315 | | |
7314 | 7316 | | |
7315 | | - | |
| 7317 | + | |
7316 | 7318 | | |
7317 | 7319 | | |
7318 | 7320 | | |
| |||
7322 | 7324 | | |
7323 | 7325 | | |
7324 | 7326 | | |
7325 | | - | |
7326 | | - | |
7327 | | - | |
| 7327 | + | |
| 7328 | + | |
| 7329 | + | |
| 7330 | + | |
| 7331 | + | |
| 7332 | + | |
7328 | 7333 | | |
7329 | 7334 | | |
7330 | 7335 | | |
| |||
7382 | 7387 | | |
7383 | 7388 | | |
7384 | 7389 | | |
7385 | | - | |
7386 | | - | |
7387 | | - | |
7388 | 7390 | | |
7389 | 7391 | | |
7390 | 7392 | | |
7391 | 7393 | | |
7392 | 7394 | | |
7393 | 7395 | | |
7394 | 7396 | | |
7395 | | - | |
| 7397 | + | |
| 7398 | + | |
| 7399 | + | |
| 7400 | + | |
| 7401 | + | |
7396 | 7402 | | |
7397 | 7403 | | |
7398 | 7404 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
0 commit comments