You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Workaround for @asin labels in uncurried externals. (#6527)
* Workaround for `@as`in labels in uncurried externals.
Examples like this:
```
@obj
external makeOptions: (
~objectMode: @as(json`false`) _,
~name: string,
unit,
) => int = ""
```
change the arity of the function.
The arity of uncurried functions is determined at parsing type.
This means that this peculiarity of externals affects parsing.
This PR gives an approximate workaround based on the labelled arg having `@as`, and the type being `_` (the any type).
Fixes#6517
* Example with 2 default args.
* Add example outside externals, which should not fail.
* Restrict workaround to only fire inside an external.
0 commit comments