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

Fixed required trait constraint not being checked #6525

Merged
merged 5 commits into from
Sep 18, 2024

Conversation

esdrubal
Copy link
Contributor

@esdrubal esdrubal commented Sep 10, 2024

Description

An optimization on check_if_trait_constraints_are_satisfied_for_type_inner was making missing trait constraints not being detected.

Fixes #6374.

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.

An optimization on `check_if_trait_constraints_are_satisfied_for_type_inner`
was making missing trait constraints to not beeing detected.

Fixes #6374.
@esdrubal esdrubal added bug Something isn't working P: medium audit-report Related to the audit report labels Sep 10, 2024
@esdrubal esdrubal self-assigned this Sep 10, 2024
Copy link

codspeed-hq bot commented Sep 10, 2024

CodSpeed Performance Report

Merging #6525 will not alter performance

Comparing esdrubal/fix_additional_constraints (44a5d0d) with master (15c8298)

Summary

✅ 22 untouched benchmarks

@esdrubal esdrubal marked this pull request as ready for review September 16, 2024 11:15
@esdrubal esdrubal requested a review from a team as a code owner September 16, 2024 11:15
@esdrubal esdrubal changed the title Fixed required trait constraint not beeing checked Fixed required trait constraint not being checked Sep 16, 2024
@sdankel
Copy link
Member

sdankel commented Sep 17, 2024

Should we add a test of the repro from the original issue?

@esdrubal
Copy link
Contributor Author

Should we add a test of the repro from the original issue?

Thanks for noticing, I added the missing test.

@JoshuaBatty JoshuaBatty requested review from a team and sdankel September 18, 2024 11:15
@tritao tritao enabled auto-merge (squash) September 18, 2024 22:15
@tritao tritao merged commit 10a78a7 into master Sep 18, 2024
38 checks passed
@tritao tritao deleted the esdrubal/fix_additional_constraints branch September 18, 2024 22:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
audit-report Related to the audit report bug Something isn't working P: medium
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Additional Constraints for Generics Are Not Respected
4 participants