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
__getitem__
As title.
This is weird since if we change the return type to Int, the syntax sugar works fine.
Int
fn main(): var a = A() a[0:10] # error: invalid call to '__getitem__': expected at most 1 positional argument, got 2 @value struct A: fn __getitem__[s: Slice](self) -> String: return ""
Mojo 2024.7.905 (e860c551)
The text was updated successfully, but these errors were encountered:
Thanks for the small reproducer! We'll look into this
Sorry, something went wrong.
No branches or pull requests
Bug description
As title.
Steps to reproduce
This is weird since if we change the return type to
Int
, the syntax sugar works fine.System information
The text was updated successfully, but these errors were encountered: