TypeScript/tests/baselines/reference/for-of14.js
2017-02-24 17:48:06 -08:00

19 lines
371 B
TypeScript

//// [for-of14.ts]
class StringIterator {
next() {
return "";
}
}
var v: string;
for (v of new StringIterator) { } // Should fail because the iterator is not iterable
//// [for-of14.js]
class StringIterator {
next() {
return "";
}
}
var v;
for (v of new StringIterator) { } // Should fail because the iterator is not iterable