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

Improve record field suffix warnings #7206

Merged
merged 3 commits into from
Nov 12, 2024
Merged

Improve record field suffix warnings #7206

merged 3 commits into from
Nov 12, 2024

Conversation

agu-z
Copy link
Collaborator

@agu-z agu-z commented Nov 9, 2024

We currently report a warning when we find a pure function in a !-suffixed record literal field. However, we realized this doesn't make sense, because you might want a record field to allow effectful functions but not require them (example).

This PR removes this warning for !-suffixed record literal fields specifically, and it starts reporting it in annotations where it does make sense.

Note: We still warn about unsuffixed record field literals with effectful functions.

Records fields that allow effectful functions, should also accept
pure functions.
Copy link
Contributor

@jwoudenberg jwoudenberg left a comment

Choose a reason for hiding this comment

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

Don't know if it counts given I've not done reviews here before, but this looks great to me. Thanks for the quick fix!

@agu-z agu-z merged commit 2ea62a0 into main Nov 12, 2024
18 checks passed
@agu-z agu-z deleted the record-suffix-warn-tweaks branch November 12, 2024 21:35
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.

3 participants