Skip to content

Fix formatting of comments inside type annotations#5500

Merged
lpil merged 2 commits intogleam-lang:mainfrom
giacomocavalieri:fix-5225-format-inside-function
Mar 23, 2026
Merged

Fix formatting of comments inside type annotations#5500
lpil merged 2 commits intogleam-lang:mainfrom
giacomocavalieri:fix-5225-format-inside-function

Conversation

@giacomocavalieri
Copy link
Copy Markdown
Member

@giacomocavalieri giacomocavalieri commented Mar 23, 2026

This PR fixes #5225. I've taken the failing test from @robertDurst PR, but the implementation takes a different approach, mimicking what we already do for expressions!


  • The changes in this PR have been discussed beforehand in an issue
  • The issue for this PR has been linked
  • Tests have been added for new behaviour
  • The changelog has been updated for any user-facing changes

@giacomocavalieri giacomocavalieri force-pushed the fix-5225-format-inside-function branch from 8cd51cc to e7c4684 Compare March 23, 2026 09:11
@giacomocavalieri giacomocavalieri changed the title Fix 5225 format inside function Fix formatting of comments inside type annotations Mar 23, 2026
Copy link
Copy Markdown
Member

@lpil lpil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@lpil lpil merged commit f4daf5b into gleam-lang:main Mar 23, 2026
12 checks passed
@giacomocavalieri giacomocavalieri deleted the fix-5225-format-inside-function branch March 23, 2026 09:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Formatter reoders comments inside function types

2 participants