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

fix(experimental elaborator): Only add_generics once for each item #5090

Closed
wants to merge 44 commits into from

Conversation

jfecher
Copy link
Contributor

@jfecher jfecher commented May 23, 2024

Description

Problem*

Resolves an issue introduced by #5082 where add_generics would be called multiple times on a given item. Once when declaring the FuncMeta beforehand, and again when defining it afterward. This is an issue because add_generics will give a fresh set of generics each time. This meant the generics in a function's signature weren't the same type variables as the ones used internally, which led to type errors.

Summary*

Additional Context

Down to 400 errors in the stdlib down from 1050

Documentation*

Check one:

  • No documentation needed.
  • Documentation included in this PR.
  • [For Experimental Features] Documentation to be submitted in a separate PR.

PR Checklist*

  • I have tested the changes locally.
  • I have formatted the changes with Prettier and/or cargo fmt on default settings.

@jfecher
Copy link
Contributor Author

jfecher commented May 23, 2024

Wrong merge target

@jfecher jfecher closed this May 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant