mirror of
https://github.com/voltrevo/ValueScript.git
synced 2026-04-18 03:00:27 -04:00
Add failing input for string iteration
This commit is contained in:
@@ -407,12 +407,13 @@ ValueScript is in early development. There may be some descriptions of
|
||||
ValueScript elsewhere here that represent how ValueScript is intended to work,
|
||||
not the subset of ValueScript that has actually been implemented.
|
||||
|
||||
A lot of the essential language features are implemented, including:
|
||||
Lots of things are implemented though, including:
|
||||
|
||||
- Classes
|
||||
- Closures
|
||||
- Loops
|
||||
- Recursion
|
||||
- Destructuring
|
||||
- Local imports¹
|
||||
- Tree shaking¹
|
||||
|
||||
|
||||
15
inputs/failing/stringIteration.ts
Normal file
15
inputs/failing/stringIteration.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
// 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.
|
||||
|
||||
export default function () {
|
||||
const str = "🚀🍹abc£한🎨";
|
||||
let outputs = [];
|
||||
|
||||
for (const c of str) {
|
||||
outputs.push(c);
|
||||
}
|
||||
|
||||
return outputs;
|
||||
}
|
||||
Reference in New Issue
Block a user