Commit 161240b
committed
[Sema/SILGen] Omnibus of
- Diagnose standalone `self` within init accessors
- Diagnose references to members not listed in `initializes` or `accesses` attributes within init accessors
- Enforce that `@out` parameters are fully initialized before every terminator
- Detect and don't synthesize memberwise initializer with intersecting init accessor calls
- Diagnose situations when memberwise init cannot be synthesized due to use of not-yet-initialized properties
- Allow initialization expressions when computed property has init accessor;
- Synthesize default argument for init accessor property included in memberwise initializer.
(cherry picked from commit 5613006)
(cherry picked from commit 935142f)
(cherry picked from commit 3c924be)
(cherry picked from commit db024d9)
(cherry picked from commit f6fd0bc)
(cherry picked from commit ddcfe01)
(cherry picked from commit 4f59538)
(cherry picked from commit cffc3fd)
(cherry picked from commit 6ca9728)
(cherry picked from commit 34c8cf6)
(cherry picked from commit 8b1c9c9)
(cherry picked from commit d1554f2)
(cherry picked from commit fc895b4)
(cherry picked from commit f58d407)init accessor feature improvements1 parent 76ce58e commit 161240b
File tree
24 files changed
+889
-68
lines changed- include/swift
- AST
- Sema
- lib
- AST
- Parse
- SILGen
- SILOptimizer/Mandatory
- Sema
- test
- Interpreter
- SILOptimizer
- decl/var
24 files changed
+889
-68
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5319 | 5319 | | |
5320 | 5320 | | |
5321 | 5321 | | |
| 5322 | + | |
| 5323 | + | |
| 5324 | + | |
| 5325 | + | |
| 5326 | + | |
| 5327 | + | |
| 5328 | + | |
| 5329 | + | |
| 5330 | + | |
| 5331 | + | |
5322 | 5332 | | |
5323 | 5333 | | |
5324 | 5334 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
| 85 | + | |
85 | 86 | | |
86 | 87 | | |
87 | 88 | | |
| |||
457 | 458 | | |
458 | 459 | | |
459 | 460 | | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
460 | 473 | | |
461 | 474 | | |
462 | 475 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7296 | 7296 | | |
7297 | 7297 | | |
7298 | 7298 | | |
7299 | | - | |
| 7299 | + | |
| 7300 | + | |
| 7301 | + | |
| 7302 | + | |
| 7303 | + | |
| 7304 | + | |
| 7305 | + | |
| 7306 | + | |
| 7307 | + | |
| 7308 | + | |
| 7309 | + | |
| 7310 | + | |
| 7311 | + | |
| 7312 | + | |
| 7313 | + | |
| 7314 | + | |
7300 | 7315 | | |
7301 | 7316 | | |
7302 | 7317 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4312 | 4312 | | |
4313 | 4313 | | |
4314 | 4314 | | |
| 4315 | + | |
| 4316 | + | |
| 4317 | + | |
| 4318 | + | |
| 4319 | + | |
| 4320 | + | |
| 4321 | + | |
| 4322 | + | |
| 4323 | + | |
| 4324 | + | |
| 4325 | + | |
| 4326 | + | |
| 4327 | + | |
| 4328 | + | |
| 4329 | + | |
| 4330 | + | |
4315 | 4331 | | |
4316 | 4332 | | |
4317 | 4333 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
487 | 487 | | |
488 | 488 | | |
489 | 489 | | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
490 | 493 | | |
491 | 494 | | |
492 | 495 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
447 | 447 | | |
448 | 448 | | |
449 | 449 | | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
450 | 454 | | |
451 | 455 | | |
452 | 456 | | |
| |||
3536 | 3540 | | |
3537 | 3541 | | |
3538 | 3542 | | |
| 3543 | + | |
| 3544 | + | |
| 3545 | + | |
| 3546 | + | |
| 3547 | + | |
| 3548 | + | |
| 3549 | + | |
| 3550 | + | |
| 3551 | + | |
| 3552 | + | |
| 3553 | + | |
| 3554 | + | |
| 3555 | + | |
| 3556 | + | |
| 3557 | + | |
| 3558 | + | |
| 3559 | + | |
| 3560 | + | |
| 3561 | + | |
| 3562 | + | |
| 3563 | + | |
| 3564 | + | |
| 3565 | + | |
| 3566 | + | |
| 3567 | + | |
| 3568 | + | |
| 3569 | + | |
| 3570 | + | |
| 3571 | + | |
| 3572 | + | |
| 3573 | + | |
| 3574 | + | |
| 3575 | + | |
3539 | 3576 | | |
3540 | 3577 | | |
3541 | 3578 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1879 | 1879 | | |
1880 | 1880 | | |
1881 | 1881 | | |
| 1882 | + | |
| 1883 | + | |
| 1884 | + | |
| 1885 | + | |
| 1886 | + | |
1882 | 1887 | | |
1883 | 1888 | | |
1884 | 1889 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6711 | 6711 | | |
6712 | 6712 | | |
6713 | 6713 | | |
| 6714 | + | |
| 6715 | + | |
| 6716 | + | |
| 6717 | + | |
| 6718 | + | |
| 6719 | + | |
6714 | 6720 | | |
6715 | 6721 | | |
6716 | 6722 | | |
| |||
7159 | 7165 | | |
7160 | 7166 | | |
7161 | 7167 | | |
| 7168 | + | |
| 7169 | + | |
| 7170 | + | |
| 7171 | + | |
| 7172 | + | |
| 7173 | + | |
7162 | 7174 | | |
7163 | 7175 | | |
7164 | 7176 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
211 | 211 | | |
212 | 212 | | |
213 | 213 | | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
214 | 232 | | |
215 | 233 | | |
216 | 234 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1059 | 1059 | | |
1060 | 1060 | | |
1061 | 1061 | | |
1062 | | - | |
1063 | | - | |
| 1062 | + | |
| 1063 | + | |
1064 | 1064 | | |
1065 | 1065 | | |
1066 | 1066 | | |
1067 | 1067 | | |
1068 | 1068 | | |
1069 | | - | |
| 1069 | + | |
1070 | 1070 | | |
1071 | 1071 | | |
1072 | 1072 | | |
| |||
1087 | 1087 | | |
1088 | 1088 | | |
1089 | 1089 | | |
1090 | | - | |
| 1090 | + | |
1091 | 1091 | | |
1092 | | - | |
| 1092 | + | |
1093 | 1093 | | |
1094 | 1094 | | |
1095 | 1095 | | |
| |||
0 commit comments