Skip to content

Commit

Permalink
chore(experimental): Elaborate impls & non-trait impls (#5007)
Browse files Browse the repository at this point in the history
# Description

## Problem\*

Working towards #4594 

## Summary\*

Adds support for impls and trait impls to the elaborator.

This was somewhat satisfying to add since the existing code for this in
`dc_crate.rs` is very messy & long winded due to our current design of
creating a new `NameResolver` for every resolution. Keeping everything
in the same elaborator and not needing to keep setting the interner, def
maps, current crate, module, generics, append errors, etc saved many
lines. I think this implementation is roughly half the size as a result.

## Additional Context

Still need types, type aliases, and globals after this. The pass is
testable after that but is expected to fail the comptime tests at least.
So I'll need to inline the comptime scanning pass in the elaborator as
well. After that the pass is theoretically done but realistically there
will be bugs to fix before we can make it the default.

## Documentation\*

Check one:
- [x] No documentation needed.
- [ ] Documentation included in this PR.
- [ ] **[For Experimental Features]** Documentation to be submitted in a
separate PR.

# PR Checklist\*

- [x] I have tested the changes locally.
- [x] I have formatted the changes with [Prettier](https://prettier.io/)
and/or `cargo fmt` on default settings.
  • Loading branch information
jfecher committed May 21, 2024
1 parent fab1c35 commit aea60c0
Show file tree
Hide file tree
Showing 2 changed files with 342 additions and 17 deletions.
Loading

0 comments on commit aea60c0

Please sign in to comment.