-
-
Notifications
You must be signed in to change notification settings - Fork 648
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
IntIterators are not Iterable #11664
Comments
The real problem here is that |
Making |
Huh, I thought we disallowed the combination of static extensions and implicit casts, but I guess I'm thinking of something else. |
Right, it doesn't work with And this looks silly 😅 overload extern inline function iter<T>(it:Iterable<T>, fn:T->Void) {
for (item in it)
fn(item);
}
overload extern inline function iter<T>(it:Iterator<T>, fn:T->Void) {
for (item in it)
fn(item);
} |
The above seems like it should be valid syntax, but since IntIterator does not have an
iterator():Iterator<Int>
method to allow it to work as an Iterable, it does not work.The text was updated successfully, but these errors were encountered: