Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: Unecessary parentheses in types with attributes #2520

Open
Julow opened this issue Feb 5, 2024 · 0 comments
Open

Bug: Unecessary parentheses in types with attributes #2520

Julow opened this issue Feb 5, 2024 · 0 comments

Comments

@Julow
Copy link
Collaborator

Julow commented Feb 5, 2024

Describe the bug

Parentheses around types with attributes can be skipped in some cases. Spotted in #2519

let _ : (foo[@attr]) = ()

Ideally, Ast.parenze_typ would take attributes into account and fmt_core_type wouldn't apply parentheses unconditionally.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant