-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Remove incorrect type restrictions on index methods with offset #10972
Remove incorrect type restrictions on index methods with offset #10972
Conversation
Just ran into this yesterday and started making changes for a PR. You beat me to it 😉 I wonder how many more regressions like this there are |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @straight-shoota 🙏
…nt32?` return type `Slice(UInt8)#index(UInt8, Int)` delegates to `Slice#fast_index` which has a return type of `Int32` but the compiler would not be able to figure that out and merge in the type of `offset` into the union.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
This reverts commit f2b69fd. Crystal 1.1.0 is not supported by Invidious due to upstream issue. See crystal-lang/crystal#10972
#10583 introduced return type restrictions to
index
methods that are not correct, because the return type depends on the type of theoffset
parameter.Resolves #10969