2015-02-24 22:35:42 +01:00
|
|
|
//// [for-of25.ts]
|
|
|
|
var x: any;
|
|
|
|
for (var v of new StringIterator) { }
|
|
|
|
|
|
|
|
class StringIterator {
|
|
|
|
[Symbol.iterator]() {
|
|
|
|
return x;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
//// [for-of25.js]
|
|
|
|
var x;
|
2015-03-09 02:23:23 +01:00
|
|
|
for (var v of new StringIterator) {
|
|
|
|
}
|
2015-02-24 22:35:42 +01:00
|
|
|
var StringIterator = (function () {
|
|
|
|
function StringIterator() {
|
|
|
|
}
|
|
|
|
StringIterator.prototype[Symbol.iterator] = function () {
|
|
|
|
return x;
|
|
|
|
};
|
|
|
|
return StringIterator;
|
|
|
|
})();
|