-
Notifications
You must be signed in to change notification settings - Fork 38
Fix eaten async for function with labelled args #676
Conversation
I don't know the history of why letting only the pexp_fun with nolabel arg keeps the attributes. syntax/src/res_parsetree_viewer.ml Line 176 in a3c27ef
|
This PR allows the Pexp_fun with labeled and optional to keep the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, thanks a lot for fixing this! 🎉
(I don't know why Pexp_fun with Nolabel keeps all attributes either though.)
Oops, I had another fix done on the plane: |
Basically, for This does not fit well with the fact that |
(fun (({txt}, _) : Parsetree.attribute) -> txt = "res.async") | ||
attrs | ||
in | ||
collect asyncAttr [] {expr with pexp_attributes = []} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This throws away all the other attributes, if there are some.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are correct.
There was a reason! Thank you for the explanation. I couldn't guess it. 👍 |
I'm going to close this PR, #677 will fix the issue. |
This PR fixes #674