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

Forbid configurables in constants #5497

Merged
merged 3 commits into from
Jan 21, 2024
Merged

Conversation

IGI-111
Copy link
Contributor

@IGI-111 IGI-111 commented Jan 19, 2024

Description

Don't allow configurables to be used in const expressions except as
storage and configurable initializers.

Fix #5272
Fix #5261

Checklist

  • I have linked to any relevant issues.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have updated the documentation where relevant (API docs, the reference, and the Sway book).
  • I have added tests that prove my fix is effective or that my feature works.
  • I have added (or requested a maintainer to add) the necessary Breaking* or New Feature labels where relevant.
  • I have done my best to ensure that my PR adheres to the Fuel Labs Code Review Standards.
  • I have requested a review from the relevant team or maintainers.

@IGI-111 IGI-111 added the breaking May cause existing user code to break. Requires a minor or major release. label Jan 19, 2024
@IGI-111 IGI-111 self-assigned this Jan 19, 2024
@IGI-111 IGI-111 force-pushed the IGI-111/configurable-consts branch 2 times, most recently from 0f01347 to c8e78dc Compare January 19, 2024 23:25
Don't allow configurables to be used in const expressions except as
storage and configurable initializers.

Fix #5272
Fix #5261
@IGI-111 IGI-111 requested a review from a team January 20, 2024 01:46
@IGI-111 IGI-111 marked this pull request as ready for review January 20, 2024 01:46
@JoshuaBatty JoshuaBatty requested a review from a team January 20, 2024 05:50
@IGI-111 IGI-111 merged commit def5f67 into master Jan 21, 2024
37 checks passed
@IGI-111 IGI-111 deleted the IGI-111/configurable-consts branch January 21, 2024 02:01
sdankel pushed a commit that referenced this pull request Jan 24, 2024
## Description

Don't allow configurables to be used in const expressions except as
storage and configurable initializers.

Fix #5272
Fix #5261


## Checklist

- [x] I have linked to any relevant issues.
- [x] I have commented my code, particularly in hard-to-understand
areas.
- [x] I have updated the documentation where relevant (API docs, the
reference, and the Sway book).
- [x] I have added tests that prove my fix is effective or that my
feature works.
- [x] I have added (or requested a maintainer to add) the necessary
`Breaking*` or `New Feature` labels where relevant.
- [x] I have done my best to ensure that my PR adheres to [the Fuel Labs
Code Review
Standards](https://github.com/FuelLabs/rfcs/blob/master/text/code-standards/external-contributors.md).
- [x] I have requested a review from the relevant team or maintainers.

Co-authored-by: João Matos <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking May cause existing user code to break. Requires a minor or major release.
Projects
None yet
3 participants