Skip to content

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

Closed
jfecher wants to merge 44 commits intomasterfrom
jf/elaborator-fixes2
Closed

fix(experimental elaborator): Only add_generics once for each item#5090
jfecher wants to merge 44 commits intomasterfrom
jf/elaborator-fixes2

Conversation

@jfecher
Copy link
Copy Markdown
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 jfecher requested review from michaeljklein and vezenovm May 23, 2024 17:55
@jfecher
Copy link
Copy Markdown
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