Commit 9c42e3f
BridgeJS: fix codegen for async + throws exported methods
The render method handled isAsync and isThrows as mutually exclusive
branches, so methods that were both async and throws only got the
JSPromise.async wrapper without the explicit throws(JSException) type
annotation on the closure. This caused the Swift compiler to infer
throws(any Error) instead of throws(JSException), producing a build
error.
Add a new branch for the combined case that explicitly annotates the
closure with `() async throws(JSException) [-> JSValue] in`.
Made-with: Cursor1 parent 0c4c45a commit 9c42e3f
1 file changed
+12
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
319 | 319 | | |
320 | 320 | | |
321 | 321 | | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
322 | 333 | | |
323 | | - | |
| 334 | + | |
324 | 335 | | |
325 | 336 | | |
326 | 337 | | |
| |||
0 commit comments