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

Call to non-existing method Slip.from-loop in src/core.c/array_slice.pm6 #3624

Closed
usev6 opened this issue Apr 13, 2020 · 3 comments
Closed

Comments

@usev6
Copy link
Contributor

usev6 commented Apr 13, 2020

The Problem

This line from src/core.c/array_slice.pm6 has a call to Slip.from-loop(): https://github.com/rakudo/rakudo/blob/f987cdb0ba/src/core.c/array_slice.pm6#L250

But we only have Seq.from-loop().

Unfortunately, I have no idea for code that would trigger this elsif branch (to create a test and changing the line to use the exising from-loop method).

20:47 | lizmat | m: Slip.from-loop
20:47 | camelia | rakudo-moar f987cdb: OUTPUT: «No such method 'from-loop' for invocant of type 'Slip'␤ in block at line 1␤␤»
20:47 | lizmat | which implies that path is never taken
[...]
20:49 | lizmat | seeing that that code has been in there since Sep 2015, I'm pretty sure we can just take it out
20:49 | lizmat | as there has been no test breakage and no ecosystem breakage because of it

@usev6 usev6 changed the title Call to non-existing method in src/core.c/array_slice.pm6 Call to non-existing method Slip.from-loop in src/core.c/array_slice.pm6 Apr 13, 2020
@niner
Copy link
Collaborator

niner commented Apr 14, 2020 via email

@lizmat
Copy link
Contributor

lizmat commented Apr 14, 2020

I think this is a leftover from before the GLR. An Iterator is not an Iterable. For the same reason, this doesn't iterate:

my @a = ^5;
.say for @a.iterator; # Rakudo::Iterator::ReifiedArrayIterator.new

So I think deleting that piece of code was the right thing to do.

@usev6
Copy link
Contributor Author

usev6 commented May 21, 2020

For the sake of completeness: the code I've mentioned in the original report has been removed with 3aaca26. Therefor I'm closing this issue.

@usev6 usev6 closed this as completed May 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants