TypeScript/tests/baselines/reference/for-of16.errors.txt

14 lines
478 B
Plaintext
Raw Normal View History

tests/cases/conformance/es6/for-ofStatements/for-of16.ts(2,11): error TS2489: An iterator must have a 'next()' method.
2015-02-24 04:07:45 +01:00
==== tests/cases/conformance/es6/for-ofStatements/for-of16.ts (1 errors) ====
var v: string;
for (v of new StringIterator) { } // Should fail
~~~~~~~~~~~~~~~~~~
!!! error TS2489: An iterator must have a 'next()' method.
2015-02-24 04:07:45 +01:00
class StringIterator {
[Symbol.iterator]() {
return this;
}
}