Commit cd8d3ad
committed
Mimic old objcImpl behavior for early adopters
Before the update to support the new syntax, the decl checker treated private and fileprivate members of objcImpl extensions as non-@objc by default. But SE-0436 specified that private and fileprivate members should be implicitly @objc unless opted out, so when support for the final syntax was added, this behavior was changed retroactively.
Unfortunately, we’ve found that some early adopters depended on the old behavior. Restore some logic deleted by swiftlang#73309 for early adopter syntax *only*, with a warning telling the developer to put `final` or `@nonobjc` on the declaration if they want to preserve the behavior after updating it.
Also tweaks the ObjCImplementationChecker to ensure this logic will actually be run in time for it to suppress the “upgrade to @objc @implementation” warning, and corrects a couple of regressions arising from that change.
Fixes rdar://135747897.1 parent 07357b9 commit cd8d3ad
File tree
5 files changed
+61
-7
lines changed- include/swift/AST
- lib/Sema
- test
- SILOptimizer
- Serialization
- decl/ext
5 files changed
+61
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1814 | 1814 | | |
1815 | 1815 | | |
1816 | 1816 | | |
| 1817 | + | |
| 1818 | + | |
| 1819 | + | |
| 1820 | + | |
| 1821 | + | |
| 1822 | + | |
1817 | 1823 | | |
1818 | 1824 | | |
1819 | 1825 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1493 | 1493 | | |
1494 | 1494 | | |
1495 | 1495 | | |
| 1496 | + | |
| 1497 | + | |
| 1498 | + | |
| 1499 | + | |
| 1500 | + | |
| 1501 | + | |
| 1502 | + | |
| 1503 | + | |
| 1504 | + | |
| 1505 | + | |
| 1506 | + | |
| 1507 | + | |
| 1508 | + | |
1496 | 1509 | | |
1497 | 1510 | | |
1498 | 1511 | | |
| |||
1501 | 1514 | | |
1502 | 1515 | | |
1503 | 1516 | | |
| 1517 | + | |
| 1518 | + | |
| 1519 | + | |
| 1520 | + | |
1504 | 1521 | | |
1505 | 1522 | | |
1506 | 1523 | | |
| |||
1510 | 1527 | | |
1511 | 1528 | | |
1512 | 1529 | | |
1513 | | - | |
| 1530 | + | |
| 1531 | + | |
| 1532 | + | |
| 1533 | + | |
| 1534 | + | |
| 1535 | + | |
| 1536 | + | |
| 1537 | + | |
1514 | 1538 | | |
1515 | 1539 | | |
1516 | 1540 | | |
| |||
1532 | 1556 | | |
1533 | 1557 | | |
1534 | 1558 | | |
| 1559 | + | |
| 1560 | + | |
| 1561 | + | |
| 1562 | + | |
| 1563 | + | |
| 1564 | + | |
| 1565 | + | |
| 1566 | + | |
| 1567 | + | |
| 1568 | + | |
| 1569 | + | |
| 1570 | + | |
| 1571 | + | |
1535 | 1572 | | |
1536 | 1573 | | |
1537 | 1574 | | |
| |||
2412 | 2449 | | |
2413 | 2450 | | |
2414 | 2451 | | |
| 2452 | + | |
| 2453 | + | |
| 2454 | + | |
| 2455 | + | |
| 2456 | + | |
2415 | 2457 | | |
2416 | 2458 | | |
2417 | 2459 | | |
| |||
3263 | 3305 | | |
3264 | 3306 | | |
3265 | 3307 | | |
| 3308 | + | |
| 3309 | + | |
| 3310 | + | |
3266 | 3311 | | |
3267 | 3312 | | |
3268 | 3313 | | |
| |||
3283 | 3328 | | |
3284 | 3329 | | |
3285 | 3330 | | |
3286 | | - | |
| 3331 | + | |
| 3332 | + | |
3287 | 3333 | | |
3288 | 3334 | | |
3289 | 3335 | | |
| |||
3870 | 3916 | | |
3871 | 3917 | | |
3872 | 3918 | | |
3873 | | - | |
| 3919 | + | |
| 3920 | + | |
3874 | 3921 | | |
3875 | 3922 | | |
3876 | 3923 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
| 21 | + | |
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
| 21 | + | |
| 22 | + | |
22 | 23 | | |
23 | 24 | | |
24 | 25 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
443 | 443 | | |
444 | 444 | | |
445 | 445 | | |
446 | | - | |
447 | | - | |
| 446 | + | |
| 447 | + | |
448 | 448 | | |
449 | 449 | | |
450 | 450 | | |
| |||
0 commit comments