Describe the bug
This is an edge case where the formatter messes up an empty tuple that contains a comment.
To Reproduce
Consider the following code:
fn tup() -> () {
(
// this is an empty tuple
)
}
Running this through the formatter generates
fn tup() -> () {
(
, // this is an empty tuple
)
}
Notice the addition of the stray comma, which the interpreter is not able to parse.
Expected behavior
The comma should not be added.
Additional context
I think this is a fairly simple bug, I would be interested in resolving this is maintainers agree it is an issue.
Describe the bug
This is an edge case where the formatter messes up an empty tuple that contains a comment.
To Reproduce
Consider the following code:
Running this through the formatter generates
Notice the addition of the stray comma, which the interpreter is not able to parse.
Expected behavior
The comma should not be added.
Additional context
I think this is a fairly simple bug, I would be interested in resolving this is maintainers agree it is an issue.