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

Add tests for recursive const definitions and associated consts usages #6545

Merged
merged 2 commits into from
Sep 14, 2024

Conversation

ironcev
Copy link
Member

@ironcev ironcev commented Sep 13, 2024

Description

This PR adds additional tests for constants. Those test cases are important for the implementation of #6351 which will completely restructure compilation of constants.

Tests for recursive const definitions should also be considered before we start implementing const fn and const trait. In particular, we want to better track and provide precise error messages in case of unintended attempt to recursively define a constant in a complex situation that includes const fn and const trait.

Related to #6534, #6537, #6538, #6539, #6540, #6543, and #6544.

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.

@ironcev ironcev self-assigned this Sep 13, 2024
@ironcev ironcev added the testing General testing label Sep 13, 2024
@ironcev ironcev marked this pull request as ready for review September 13, 2024 19:04
@ironcev ironcev requested a review from a team as a code owner September 13, 2024 19:04
@ironcev ironcev requested a review from a team September 13, 2024 19:05
Copy link
Member

@sdankel sdankel left a comment

Choose a reason for hiding this comment

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

lgtm!

@ironcev ironcev enabled auto-merge (squash) September 14, 2024 22:03
@ironcev ironcev merged commit e1a05fc into master Sep 14, 2024
36 checks passed
@ironcev ironcev deleted the ironcev/additional-tests-for-constants branch September 14, 2024 22:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
testing General testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants