TypeScript/tests/baselines/reference/for-of14.js

19 lines
371 B
TypeScript
Raw Normal View History

2015-02-24 04:07:45 +01:00
//// [for-of14.ts]
var v: string;
for (v of new StringIterator) { } // Should fail because the iterator is not iterable
class StringIterator {
next() {
return "";
}
}
//// [for-of14.js]
var v;
for (v of new StringIterator) { } // Should fail because the iterator is not iterable
2015-03-16 05:27:54 +01:00
class StringIterator {
next() {
2015-02-24 04:07:45 +01:00
return "";
2015-03-16 05:27:54 +01:00
}
}