Compile for-of using iteration instead of indexing

This commit is contained in:
Andrew Morris
2023-05-29 16:07:31 +10:00
parent b949027501
commit 87dfda4855
2 changed files with 38 additions and 44 deletions

View File

@@ -1,4 +1,4 @@
// test_output! ["🚀","","","","🍹","","","","a","b","c","£","","한","","","🎨","","",""]
// // test_output! ["🚀","","","","🍹","","","","a","b","c","£","","한","","","🎨","","",""]
// This is wrong. It should be: ["🚀","🍹","a","b","c","£","한","🎨"].
// The reason is that for-of is currently approximated using indexing from 0 to .length. This is
// expected to be fixed when iterators are added to the language.