Commit 5459737
committed
Don’t declare async methods with alternatives in headers
If Swift sees this pattern of methods in an @objc protocol:
```
func hello() async -> Int
@available(*, renamed: “hello()”)
func hello(completion: @escaping (Int) -> Void)
```
Then PrintAsClang will print only the completion-handler-based method, not the async one, into a generated header, on the assumption that the completion-handler method may have greater availability.
Fixes rdar://94175167.1 parent 9b5f899 commit 5459737
File tree
2 files changed
+34
-1
lines changed- lib/PrintAsClang
- test/PrintAsObjC
2 files changed
+34
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2113 | 2113 | | |
2114 | 2114 | | |
2115 | 2115 | | |
| 2116 | + | |
| 2117 | + | |
| 2118 | + | |
| 2119 | + | |
| 2120 | + | |
| 2121 | + | |
| 2122 | + | |
| 2123 | + | |
| 2124 | + | |
| 2125 | + | |
| 2126 | + | |
| 2127 | + | |
| 2128 | + | |
| 2129 | + | |
| 2130 | + | |
| 2131 | + | |
| 2132 | + | |
| 2133 | + | |
2116 | 2134 | | |
2117 | 2135 | | |
2118 | 2136 | | |
2119 | 2137 | | |
2120 | 2138 | | |
2121 | | - | |
| 2139 | + | |
| 2140 | + | |
2122 | 2141 | | |
2123 | 2142 | | |
2124 | 2143 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
30 | 44 | | |
31 | 45 | | |
32 | 46 | | |
| |||
0 commit comments