LinkedList.forEach allows to modify the list #13571
Labels
area-core-library
SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries.
core-a
docs-api
docs-articles
library-collection
type-documentation
A request to add or improve documentation
This issue was originally filed by alexe.kaigorodov@gmail.com
void forEach(void action(E entry))
Call action with each entry in the list.
It's an error if action modify the list.
An error indeed is thrown when action modify the list, but only after the list is actually modified. Usually when an invalid action is attempted, an error is thrown and the action have no consequences. Either implementation should be fixed and react early, or documentation should mention this peculiarity.
The text was updated successfully, but these errors were encountered: