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

Check for type aliases when implementing traits #6875

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

jjcnn
Copy link
Contributor

@jjcnn jjcnn commented Jan 31, 2025

Description

Fixes #6329 .

Status:

  • Testcase added. The compiler correctly rejects the program.
  • The error message has been improved to use the aliased name when appropriate
  • TODO: There are other errors in TraitMap::insert that should be similarly improved.
  • TODO: Check if we can fix this generally by not introducing new types when declaring a type alias.

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.

@jjcnn jjcnn self-assigned this Jan 31, 2025
@jjcnn jjcnn requested a review from a team as a code owner January 31, 2025 21:45
@jjcnn jjcnn added the blocked label Jan 31, 2025
@jjcnn jjcnn marked this pull request as draft January 31, 2025 22:15
@jjcnn jjcnn force-pushed the jjcnn/unalias_type_id_in_trait_map_unification branch from 610d237 to 7e268f7 Compare February 24, 2025 21:10
@jjcnn jjcnn added team:compiler Compiler Team and removed blocked labels Feb 24, 2025
Copy link

codspeed-hq bot commented Feb 24, 2025

CodSpeed Performance Report

Merging #6875 will not alter performance

Comparing jjcnn/unalias_type_id_in_trait_map_unification (c85d708) with master (fccc8a9)

Summary

✅ 22 untouched benchmarks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
team:compiler Compiler Team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Insufficient trait duplication check
1 participant