2015-02-25 02:26:16 +01:00
|
|
|
//// [for-of34.ts]
|
|
|
|
for (var v of new StringIterator) { }
|
|
|
|
|
|
|
|
class StringIterator {
|
|
|
|
next() {
|
|
|
|
return v;
|
|
|
|
}
|
|
|
|
|
|
|
|
[Symbol.iterator]() {
|
|
|
|
return this;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
//// [for-of34.js]
|
2015-03-09 02:23:23 +01:00
|
|
|
for (var v of new StringIterator) {
|
|
|
|
}
|
2015-03-16 05:27:54 +01:00
|
|
|
class StringIterator {
|
|
|
|
next() {
|
2015-02-25 02:26:16 +01:00
|
|
|
return v;
|
2015-03-16 05:27:54 +01:00
|
|
|
}
|
|
|
|
[Symbol.iterator]() {
|
2015-02-25 02:26:16 +01:00
|
|
|
return this;
|
2015-03-16 05:27:54 +01:00
|
|
|
}
|
|
|
|
}
|