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

Replace TypeInfo::SelfType with a generic type parameter #4962

Merged
merged 26 commits into from
Oct 3, 2023

Conversation

anton-trunov
Copy link
Contributor

@anton-trunov anton-trunov commented Aug 16, 2023

Description

Fixes #4877

Tasks

Checklist

  • I have linked to any relevant issues.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have updated the documentation where relevant (API docs, the reference, and the Sway book).
  • I have added tests that prove my fix is effective or that my feature works.
  • I have added (or requested a maintainer to add) the necessary Breaking* or New Feature labels where relevant.
  • I have done my best to ensure that my PR adheres to the Fuel Labs Code Review Standards.
  • I have requested a review from the relevant team or maintainers.

@anton-trunov anton-trunov force-pushed the anton-trunov/remove-self-type branch 2 times, most recently from accbf4b to 2cc62d0 Compare August 23, 2023 16:43
@anton-trunov anton-trunov self-assigned this Aug 24, 2023
@anton-trunov anton-trunov added the compiler: frontend Everything to do with type checking, control flow analysis, and everything between parsing and IRgen label Aug 24, 2023
i.e. the following simple example type-checks:

```
contract;

pub trait Trait {
    fn func(self) -> Self;
}

impl Trait for u64 {
    fn func(self) -> Self {
        42
    }
}
```
by making its priority higher
…pe parameter (ONLY for enums, structs are waiting)
by expanding trait constraints for type parameters: these now
also include supertraits as trait constraints
@anton-trunov anton-trunov marked this pull request as ready for review October 2, 2023 13:50
@anton-trunov anton-trunov requested review from IGI-111, esdrubal, tritao and a team October 2, 2023 15:15
IGI-111
IGI-111 previously approved these changes Oct 2, 2023
@IGI-111 IGI-111 requested a review from a team October 2, 2023 18:58
JoshuaBatty
JoshuaBatty previously approved these changes Oct 2, 2023
@IGI-111 IGI-111 enabled auto-merge (squash) October 3, 2023 11:18
@IGI-111 IGI-111 disabled auto-merge October 3, 2023 11:37
@anton-trunov anton-trunov merged commit 4636a93 into master Oct 3, 2023
31 checks passed
@anton-trunov anton-trunov deleted the anton-trunov/remove-self-type branch October 3, 2023 11:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler: frontend Everything to do with type checking, control flow analysis, and everything between parsing and IRgen
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove TypeInfo::SelfType in favor of tracking the self type as a type param
5 participants