-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replace TypeInfo::SelfType with a generic type parameter (#4962)
## Description Fixes #4877 ## Tasks - [x] Make a simple example with a trait and an impl for it compile - [x] Fix typechecking for empty enums - [x] Fix typechecking for trait impl methods - [x] Fix typechecking for impl self blocks - [x] Fix the case of non-implemented supertraits - [x] Fix typechecking of generic traits - [x] Fix typechecking of generic impl self blocks - [x] Resolve ambiguity between term/path-level `Self` and the type-level `Self` type parameter (related PR #4459): - [x] enums - [x] structs (deferred as issue #5164) - [x] Fix `Self` for type constraints - [x] Fix looping during insertion of trait constraints for generic tuples (inserted `occurs_check` to prevent unification of a generic `A` with a tuple `(A, A)`; - [x] Fix exponential growth of the traits map (around 30 tests out of more than 680 are failing now); related PR: #5004 - [x] Fix `Self` type for blanket implementations - [x] Fix `Self` for associated consts - [x] Fix name resolution issues for some tests with traits (like `should_pass/language/eq_intrinsic`); blocking issues: - #5018 - #5036 - [x] Fix `should_fail/generic_traits` test - [x] Fix `should_pass/language/where_clause_impls` test - [x] Fix `should_pass/language/name_resolution_inside_intrinsics` test - [x] Remove some commented out code in `impl_trait.rs` - [x] Comment new code - [x] **Disable** `should_pass/language/associated_type_container` test - [x] **Disable** `should_pass/language/associated_type_method` test - [x] **Disable** `should_pass/language/associated_type_and_associated_const` test - [x] **Disable** `should_pass/language/associated_type_iterator` test ## Checklist - [x] I have linked to any relevant issues. - [x] I have commented my code, particularly in hard-to-understand areas. - [x] I have updated the documentation where relevant (API docs, the reference, and the Sway book). - [x] I have added tests that prove my fix is effective or that my feature works. - [x] I have added (or requested a maintainer to add) the necessary `Breaking*` or `New Feature` labels where relevant. - [x] I have done my best to ensure that my PR adheres to [the Fuel Labs Code Review Standards](https://github.com/FuelLabs/rfcs/blob/master/text/code-standards/external-contributors.md). - [x] I have requested a review from the relevant team or maintainers. --------- Co-authored-by: Joshua Batty <joshpbatty@gmail.com> Co-authored-by: IGI-111 <igi-111@protonmail.com>
- Loading branch information
1 parent
32582e0
commit 4636a93
Showing
73 changed files
with
548 additions
and
1,211 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.