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

Specific impls of generic struct does not work / is not implemented #861

Closed
emilyaherbert opened this issue Mar 2, 2022 · 1 comment
Closed
Labels
compiler General compiler. Should eventually become more specific as the issue is triaged enhancement New feature or request

Comments

@emilyaherbert
Copy link
Contributor

This fails to compile:

script;

struct DoubleIdentity<T, F> {
  first: T,
  second: F
}

impl DoubleIdentity<bool, bool> {
  fn and(self) -> bool {
    self.first && self.second
  }
}

fn main() -> bool {
  let foo = DoubleIdentity {
    first: true,
    second: true
  };
  foo.and()
}

Giving:

Screen Shot 2022-03-02 at 2 00 34 PM

Probably related to #814. This should behave like: https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=4209730e624308ce86c626fb69e8e1f4

@emilyaherbert emilyaherbert added compiler General compiler. Should eventually become more specific as the issue is triaged enhancement New feature or request labels Mar 2, 2022
@emilyaherbert emilyaherbert changed the title Specific impls of generic struct does not work. Specific impls of generic struct does not work / is not implemented Mar 2, 2022
@adlerjohn adlerjohn moved this to Todo in Fuel Network Mar 2, 2022
@emilyaherbert
Copy link
Contributor Author

Closed by #913

Repository owner moved this from Todo to Done in Fuel Network Mar 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler General compiler. Should eventually become more specific as the issue is triaged enhancement New feature or request
Projects
Archived in project
Development

No branches or pull requests

1 participant