Commit 4b59301
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 f8cc074 commit 4b59301
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 | |
|---|---|---|---|
| |||
5757 | 5757 | | |
5758 | 5758 | | |
5759 | 5759 | | |
5760 | | - | |
5761 | | - | |
5762 | | - | |
| 5760 | + | |
| 5761 | + | |
5763 | 5762 | | |
5764 | 5763 | | |
5765 | 5764 | | |
| |||
5770 | 5769 | | |
5771 | 5770 | | |
5772 | 5771 | | |
5773 | | - | |
5774 | | - | |
| 5772 | + | |
| 5773 | + | |
| 5774 | + | |
5775 | 5775 | | |
5776 | 5776 | | |
5777 | 5777 | | |
| |||
5781 | 5781 | | |
5782 | 5782 | | |
5783 | 5783 | | |
5784 | | - | |
| 5784 | + | |
5785 | 5785 | | |
5786 | 5786 | | |
5787 | 5787 | | |
| |||
5790 | 5790 | | |
5791 | 5791 | | |
5792 | 5792 | | |
5793 | | - | |
5794 | | - | |
5795 | | - | |
| 5793 | + | |
| 5794 | + | |
5796 | 5795 | | |
5797 | 5796 | | |
5798 | 5797 | | |
| |||
6114 | 6113 | | |
6115 | 6114 | | |
6116 | 6115 | | |
6117 | | - | |
6118 | | - | |
| 6116 | + | |
| 6117 | + | |
| 6118 | + | |
6119 | 6119 | | |
6120 | 6120 | | |
6121 | 6121 | | |
| |||
| 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 | | |
| |||
7300 | 7302 | | |
7301 | 7303 | | |
7302 | 7304 | | |
7303 | | - | |
| 7305 | + | |
7304 | 7306 | | |
7305 | 7307 | | |
7306 | 7308 | | |
| |||
7310 | 7312 | | |
7311 | 7313 | | |
7312 | 7314 | | |
7313 | | - | |
7314 | | - | |
7315 | | - | |
| 7315 | + | |
| 7316 | + | |
| 7317 | + | |
| 7318 | + | |
| 7319 | + | |
| 7320 | + | |
7316 | 7321 | | |
7317 | 7322 | | |
7318 | 7323 | | |
| |||
7370 | 7375 | | |
7371 | 7376 | | |
7372 | 7377 | | |
7373 | | - | |
7374 | | - | |
7375 | | - | |
7376 | 7378 | | |
7377 | 7379 | | |
7378 | 7380 | | |
7379 | 7381 | | |
7380 | 7382 | | |
7381 | 7383 | | |
7382 | 7384 | | |
7383 | | - | |
| 7385 | + | |
| 7386 | + | |
| 7387 | + | |
| 7388 | + | |
| 7389 | + | |
7384 | 7390 | | |
7385 | 7391 | | |
7386 | 7392 | | |
| |||
| 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