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 2 commits into
base: master
Choose a base branch
from

Conversation

jjcnn
Copy link
Contributor

@jjcnn jjcnn commented Jan 31, 2025

Description

Fixes #6329 .

#6867 makes a lot of changes to TraitMap::insert and the unification that happens inside the trait map, so I'm postponing this issue until that PR is in a stable state.

Status:

  • Testcase added. The compiler correctly rejects the program, but the error message is unhelpful. The error message suggests that the alias still is treated as different type from the aliased type, which ought to be fixed.

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 deployed to fuel-sway-bot February 3, 2025 13:02 — with GitHub Actions Active
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Insufficient trait duplication check
1 participant