Commit 73e34f0
committed
[rbi] Teach SendNonSendable how to more aggressively suppress sending errors around obfuscated Sendable functions
Specifically the type checker to work around interface types not having
isolation introduces casts into the AST that enrich the AST with isolation
information. Part of that information is Sendable. This means that we can
sometimes lose due to conversions that a function is actually Sendable. To work
around this, we today suppress those errors when they are emitted (post 6.2, we
should just change their classification as being Sendable... but I don't want to
make that change now).
This change just makes the pattern matching for these conversions handle more
cases so that transfernonsendable_closureliterals_isolationinference.swift now
passes.1 parent ea4d044 commit 73e34f0
File tree
2 files changed
+31
-6
lines changed- include/swift/SILOptimizer/Utils
- test/Concurrency
2 files changed
+31
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1601 | 1601 | | |
1602 | 1602 | | |
1603 | 1603 | | |
1604 | | - | |
| 1604 | + | |
| 1605 | + | |
| 1606 | + | |
| 1607 | + | |
| 1608 | + | |
| 1609 | + | |
| 1610 | + | |
| 1611 | + | |
| 1612 | + | |
| 1613 | + | |
1605 | 1614 | | |
1606 | 1615 | | |
| 1616 | + | |
| 1617 | + | |
| 1618 | + | |
| 1619 | + | |
| 1620 | + | |
| 1621 | + | |
| 1622 | + | |
| 1623 | + | |
| 1624 | + | |
| 1625 | + | |
| 1626 | + | |
| 1627 | + | |
| 1628 | + | |
| 1629 | + | |
1607 | 1630 | | |
1608 | 1631 | | |
1609 | 1632 | | |
| |||
1615 | 1638 | | |
1616 | 1639 | | |
1617 | 1640 | | |
| 1641 | + | |
| 1642 | + | |
| 1643 | + | |
1618 | 1644 | | |
1619 | 1645 | | |
1620 | 1646 | | |
| |||
1647 | 1673 | | |
1648 | 1674 | | |
1649 | 1675 | | |
1650 | | - | |
| 1676 | + | |
1651 | 1677 | | |
1652 | 1678 | | |
1653 | 1679 | | |
| |||
1692 | 1718 | | |
1693 | 1719 | | |
1694 | 1720 | | |
1695 | | - | |
| 1721 | + | |
1696 | 1722 | | |
1697 | 1723 | | |
1698 | 1724 | | |
| |||
Lines changed: 2 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
38 | | - | |
39 | | - | |
| 37 | + | |
| 38 | + | |
40 | 39 | | |
41 | 40 | | |
42 | 41 | | |
| |||
0 commit comments