Commit 9d4281b
committed
Support generic @compatibility_alias in PrintAsObjC
When @compatibility_alias is used with an ObjC generic class, this ends up importing as a generic typealias. PrintAsObjC previously didn’t handle declarations involving these types correctly; it would fail an assertion in asserts compilers, and potentially print an incorrect compatibility header in non-asserts compilers.
This PR makes it so that PrintAsObjC can now correctly use generic typealiases imported from Objective-C modules. It is, of course, still not possible to declare a generic typealias in Swift that will be printed into the Objective-C header.
Fixes rdar://67256866.1 parent 28ea3e1 commit 9d4281b
File tree
4 files changed
+28
-5
lines changed- lib/PrintAsObjC
- test/PrintAsObjC
- Inputs/custom-modules
4 files changed
+28
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1572 | 1572 | | |
1573 | 1573 | | |
1574 | 1574 | | |
| 1575 | + | |
1575 | 1576 | | |
1576 | 1577 | | |
1577 | 1578 | | |
1578 | 1579 | | |
1579 | 1580 | | |
1580 | 1581 | | |
| 1582 | + | |
| 1583 | + | |
| 1584 | + | |
1581 | 1585 | | |
1582 | 1586 | | |
1583 | 1587 | | |
1584 | 1588 | | |
1585 | 1589 | | |
1586 | 1590 | | |
1587 | 1591 | | |
| 1592 | + | |
| 1593 | + | |
| 1594 | + | |
1588 | 1595 | | |
1589 | 1596 | | |
1590 | 1597 | | |
1591 | 1598 | | |
1592 | 1599 | | |
1593 | | - | |
| 1600 | + | |
| 1601 | + | |
| 1602 | + | |
| 1603 | + | |
| 1604 | + | |
1594 | 1605 | | |
1595 | 1606 | | |
1596 | 1607 | | |
| |||
1600 | 1611 | | |
1601 | 1612 | | |
1602 | 1613 | | |
| 1614 | + | |
| 1615 | + | |
1603 | 1616 | | |
1604 | 1617 | | |
1605 | 1618 | | |
1606 | | - | |
| 1619 | + | |
1607 | 1620 | | |
1608 | 1621 | | |
1609 | 1622 | | |
| |||
1737 | 1750 | | |
1738 | 1751 | | |
1739 | 1752 | | |
| 1753 | + | |
| 1754 | + | |
| 1755 | + | |
| 1756 | + | |
1740 | 1757 | | |
1741 | | - | |
| 1758 | + | |
1742 | 1759 | | |
1743 | 1760 | | |
1744 | 1761 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
60 | | - | |
61 | 60 | | |
62 | 61 | | |
63 | 62 | | |
| |||
319 | 318 | | |
320 | 319 | | |
321 | 320 | | |
| 321 | + | |
322 | 322 | | |
323 | | - | |
| 323 | + | |
| 324 | + | |
324 | 325 | | |
325 | 326 | | |
326 | 327 | | |
| |||
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
4 | 5 | | |
5 | 6 | | |
| 7 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
820 | 820 | | |
821 | 821 | | |
822 | 822 | | |
| 823 | + | |
| 824 | + | |
| 825 | + | |
823 | 826 | | |
824 | 827 | | |
825 | 828 | | |
| |||
0 commit comments