forked from FuelLabs/sway
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds support for where clauses in impl self methods. (FuelLabs#3836)
When where clauses were used in impl self methods with a generic parameter from impl<T> an error was thrown saying `cannot find type "T" in this scope` Parent type parameters that are used in method where clauses are now added to `FunctionDeclaration.type_parameters`. This is needed for `TypeParameter::gather_decl_mapping_from_trait_constraints` to work properly as we need to have a type parameter with constraints. The generated decl_mapping is used by `type_check_method_application` to replace decls from trait constraints. Closes FuelLabs#3333
- Loading branch information
Showing
18 changed files
with
592 additions
and
38 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
Oops, something went wrong.