We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
When using the results slot in a method necessary to implement a trait, the compiler complains that the trait is not implemented.
This fails:
@register_passable("trivial") struct MyStruct(Hashable): var val: Int fn __hash__(self) -> UInt as output: output = UInt(self.val)
This works:
@register_passable("trivial") struct MyStruct(Hashable): var val: Int fn __hash__(self) -> UInt: return UInt(self.val)
- WSL on Windows 10 - mojo 24.5.0 (e8aacb95) - magic 0.2.3
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Bug description
When using the results slot in a method necessary to implement a trait, the compiler complains that the trait is not implemented.
Steps to reproduce
This fails:
This works:
System information
The text was updated successfully, but these errors were encountered: