Make loop.last always available#4134
Conversation
stof
left a comment
There was a problem hiding this comment.
This implementation breaks all other methods of the Iterator interface in the Loop class as they forward the call to the seq without considering it has been peeked
Can you give me a Twig example where that could happen? |
|
I'm not sure we have cases right now where we use the iterator API directly. AFAIK, Twig will only iterate over it with a |
Agreed, and I have that locally but that will come as a next PR so that I can easily write tests via the new loop capabilities. |
No description provided.